Android Studio运行报错解决集锦(持续更新)

报错一:java.net.SocketTimeoutException: Connect timed out (连接超时)

解决方法:修改项目下gradle\wrapper\gradle-wrapper.properties

                   #distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip

                   更换连接地址

                   distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-8.7-bin.zip

报错二: Using dependency catalogs requires the activation of the matching feature preview.(使用依赖项目录需要激活匹配的功能预览。)

解决方法:项目下settings.gradle.kts文件首行添加

                enableFeaturePreview("VERSION_CATALOGS")