我希望在Dynamic Feature Module中的现有项目中实现jetpack。我跟踪了来自官方喷气背包撰写网站的官方喷气背包撰写网站,但得到了以下错误:
Execution failed for task ':features:profile:workpreferences:prepareStagingDebugKotlinCompileTask'.
> Could not resolve all files for configuration ':features:profile:workpreferences:kotlin-extension'.
> Could not find androidx.compose:compose-compiler:1.0.0-beta01.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/androidx/compose/compose-compiler/1.0.0-beta01/compose-compiler-1.0.0-beta01.pom
- https://jcenter.bintray.com/androidx/compose/compose-compiler/1.0.0-beta01/compose-compiler-1.0.0-beta01.pom
- https://repo.maven.apache.org/maven2/androidx/compose/compose-compiler/1.0.0-beta01/compose-compiler-1.0.0-beta01.pom
- https://jitpack.io/androidx/compose/compose-compiler/1.0.0-beta01/compose-compiler-1.0.0-beta01.pom
- https://dl.bintray.com/guardian/android/androidx/compose/compose-compiler/1.0.0-beta01/compose-compiler-1.0.0-beta01.pom
Required by:
project :features:profile:workpreferences
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html我已经尝试了一些方法来解决这个问题,但是没有什么效果。
7.0.0-alpha081.4.301.0.0-beta01发布于 2021-03-06 23:40:11
我也遇到了同样的错误,然后在这里查看Jetpack编写示例应用程序:https://github.com/android/compose-samples
我意识到他们所有的示例都使用了Android插件版本: 7.0.0-alpha08 08和Gradle版本: 6.8.2,所以我建议确保您的应用程序具有这种功能。一旦我更新了,我就不再看到这个错误了,但是我确实注意到有一些第三方库不支持这个AGP,所以请做好准备。android-jetpack-撰写
https://stackoverflow.com/questions/66491690
复制相似问题