gpt4 book ai didi

java - 构建错误扩展尚未初始化,无法访问 compileSdkVersion。安卓工作室

转载 作者:行者123 更新时间:2023-12-02 12:23:23 27 4
gpt4 key购买 nike

> Task :prepareKotlinBuildScriptModel UP-TO-DATE
<ij_msg_gr>Gradle import errors<ij_msg_gr><ij_nav>D:\Important_Docs\Projects\Backup\RLPHYC\android-utils\build.gradle<ij_nav><i><b>project ':android-utils': Unable to build Kotlin project configuration</b><eol>Details: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':android-utils:generateLintModuleInfo'.<eol>Caused by: java.lang.IllegalStateException: Extension not initialized yet, couldn't access compileSdkVersion.</i>
<ij_msg_gr>Gradle import errors<ij_msg_gr><ij_nav>D:\Important_Docs\Projects\Backup\RLPHYC\app\build.gradle<ij_nav><i><b>project ':app': Unable to build Kotlin project configuration</b><eol>Details: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':app:generateLintModuleInfo'.<eol>Caused by: java.lang.IllegalStateException: Extension not initialized yet, couldn't access compileSdkVersion.</i>
Extension not initialized yet, couldn't access compileSdkVersion.

Tried to invalidate cache restart also used ext in top-level Gradle and also deleted Gradle folder Still error continues


Gradle 版本没问题 用不同的 Gradle 版本都试过了

最佳答案

就像@Vacexe 说的,这是 dexcount 插件的错误。
您可以通过将 dexcount 插件版本更新为 2.0.0 来解决此问题:

classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.0.0'

关于java - 构建错误扩展尚未初始化,无法访问 compileSdkVersion。安卓工作室,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63451900/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com