今天刚刚注意到Arctic Fox发布了Beta 4的更新。由于之前使用beta版本没有问题,因此我决定将Beta 3升级为最新版。如往常一样,AGP也需要升级。新版Beta似乎工作正常,直到我尝试使用新版Gradle n AGP构建我的项目时出现了以下错误。
每次都会出现这个错误,而且我试过所有方法(包括消息中提供的建议步骤),除了退回到Arctic Fox Beta 3或其正常版本以外,都没有起作用。想知道是否有人知道原因以及是否有解决方案。
Unable to find method com.android.build.api.extension.VariantSelector com.android.build.api.extension.AndroidComponentsExtension.selector()
com.android.build.api.extension.VariantSelector com.android.build.api.extension.AndroidComponentsExtension.selector()
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.