android - Artifact : ResolvedArtifact 的空提取文件夹

标签 android android-studio android-library aar

在libs目录下添加了另一个版本的AAR,点击Sync后出现错误

Null extracted folder for artifact: ResolvedArtifact(componentIdentifier=mylib-release-1.13.aar, variantName=null, artifactFile=D:...\app\libs\mylib-release-1.13.aar, extractedFolder=null, dependencyType=ANDROID, isWrappedModule=false, buildMapping={current_build=D:...}, mavenCoordinatesCache=com.android.build.gradle.internal.ide.dependencies.MavenCoordinatesCacheBuildService$Inject@60eddcd6)

即使我将库的版本更改为 1.14 并执行了 Sync,问题仍然存在。我该如何解决这个问题?

最佳答案

确保你的 app 模块 build.gradle 必须有 libs 而不是 lib

implementation files('libs/mylib-release-1.13.aar')

关于android - Artifact : ResolvedArtifact 的空提取文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68302459/

相关文章:

java - 如何在android中将类对象存储在列表中?

安卓工作室错误 : Failed to find target with hash string 'android-24'

android - 无法执行 dex : Multiple dex files define Lcom/nineoldandroids/animation/Animator$AnimatorListener;

android - 为什么我们应该在 Android 的 MVP 模式中使用界面?

android - 使用 Android 的 Intents 在 Waze 中开始导航

android-studio - 我在 Android Studio 的布局编辑器中找不到工具栏

android - 如何设置 gradle 任务来提取 dex jar 和 c 库?

android - 库测试 : how to create a Context?

android - 有 Intent 地开始一项 Activity 并获得引用

java - Eclipse 在一段时间后因 java 错误而挂起