作者热门文章
- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我刚刚更新到 Android Studio 3.4 (Canary 5)。然后我打开我现有的项目(在 Android Studio 3.3 Beta 上完美运行)并收到此错误:
ERROR: Unsupported method: AndroidProject.getVariantNames().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
完全清理和重建,使缓存无效并重新启动,重新导入项目不起作用。
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
build.gradle(项目级别):
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
关于 Android Studio
Android Studio 3.4 Canary 5
Build #AI-183.4284.36.34.5141831, built on November 20, 2018
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-39-generic
如何解决?
最佳答案
您需要在 Android Studio 中禁用此设置:
File
> Settings
(或以前版本的 Preferences
)> Experimental
> 仅同步 Activity 变种
关于android - Android Studio 3.4 中不支持的方法 : AndroidProject. getVariantNames(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53498161/
我在旧版本的 Android Studio 上创建了应用程序,当我在最新版本 (3.1.3) 中打开此应用程序时,应用程序无法运行,我看到了一个错误。 ERROR: Unsupported metho
我刚刚更新到 Android Studio 3.4 (Canary 5)。然后我打开我现有的项目(在 Android Studio 3.3 Beta 上完美运行)并收到此错误: ERROR: Unsu
我是一名优秀的程序员,十分优秀!