bounty将在5天内到期。此问题的答案有资格获得+50声望奖励。RagAnt希望引起更多关注这个问题。
正在获取'Plugin [id:'com.android. library',版本:'7.4.2']在以下任何源中均未找到:' error when trying to run Test in CommonTest inKotlinMultiplatform移动的当我尝试在Kotlin Multiplatform Mobile项目中的CommonTest中运行测试时,我总是得到这个错误:
Build file '/Users/rageshantonyd/Documents/working_prj/current/livestock-mobile/MobileSharedLib/build.gradle.kts' line: 1
* What went wrong:
Plugin [id: 'com.android.library', version: '7.4.2'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.library:com.android.library.gradle.plugin:7.4.2')
Searched in the following repositories:
Gradle Central Plugin Repository
为什么?请帮帮我
我的gradle文件:
https://gist.github.com/RageshAntony/22112e322945617faf8cf01073e8a442
1条答案
按热度按时间sr4lhrrt1#
您的错误消息显示该插件仅在Gradle插件中心搜索。
Android Gradle插件在该存储库中不可用。
你错过了
google()
存储库在我们的pluginManagement { repositories { ... } }
部分,其中插件存在。