Android studio Android Studio:每个项目的构建都失败
我刚刚开始使用android studio,所以我没有太多经验,而且我在尝试运行任何项目时都会遇到一些错误,即使是像Hello World这样最简单的项目。我一直在寻找原因,但找不到。 我得到的错误是:Android studio Android Studio:每个项目的构建都失败,android-studio,Android Studio,我刚刚开始使用android studio,所以我没有太多经验,而且我在尝试运行任何项目时都会遇到一些错误,即使是像Hello World这样最简单的项目。我一直在寻找原因,但找不到。 我得到的错误是: * What went wrong: Execution failed for task ':app:processDebugResources'. > Could not resolve all files for configuration ':app:debu
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform artifact 'customview.aar (androidx.customview:customview:1.0.0)' to match attributes {artifactType=android-compiled-dependencies-resources}.
> Execution failed for AarResourcesCompilerTransform: C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\7462826920a444bc012a531aa0e2732f\customview-1.0.0.
> C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\7462826920a444bc012a531aa0e2732f\customview-1.0.0\AndroidManifest.xml
> Failed to transform artifact 'customview.aar (androidx.customview:customview:1.0.0)' to match attributes {artifactType=android-compiled-dependencies-resources}.
> Execution failed for AarResourcesCompilerTransform: C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\7462826920a444bc012a531aa0e2732f\customview-1.0.0.
> C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\7462826920a444bc012a531aa0e2732f\customview-1.0.0\AndroidManifest.xml
> Failed to transform artifact 'interpolator.aar (androidx.interpolator:interpolator:1.0.0)' to match attributes {artifactType=android-compiled-dependencies-resources}.
> Execution failed for AarResourcesCompilerTransform: C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\aff4cda642e9b4135c366a5a833fc1b9\interpolator-1.0.0.
> C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\aff4cda642e9b4135c366a5a833fc1b9\interpolator-1.0.0\AndroidManifest.xml
> Failed to transform artifact 'core-runtime.aar (androidx.arch.core:core-runtime:2.0.0)' to match attributes {artifactType=android-compiled-dependencies-resources}.
> Execution failed for AarResourcesCompilerTransform: C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\271101febb7091720500cb88bb508af9\core-runtime-2.0.0.
> C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\271101febb7091720500cb88bb508af9\core-runtime-2.0.0\AndroidManifest.xml
> Failed to transform artifact 'core-runtime.aar (androidx.arch.core:core-runtime:2.0.0)' to match attributes {artifactType=android-compiled-dependencies-resources}.
> Execution failed for AarResourcesCompilerTransform: C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\271101febb7091720500cb88bb508af9\core-runtime-2.0.0.
> C:\Users\alma_\.gradle\caches\transforms-2\files-2.1\271101febb7091720500cb88bb508af9\core-runtime-2.0.0\AndroidManifest.xml
有人能给我一些建议吗?我也有同样的问题。我试图根据producent的用户手册将
aar
文件添加到我的项目中。不幸的是,gradle抛出了这个错误,我找不到解决方案
我所做的就是通过Android Studio向导添加引用,使其运行
转到文件->项目结构
。单击左侧的模块
,然后单击模块
部分中的+
图标。选择导入.JAR/.AAR包。Android Studio将为您的aar
文件创建一些gradle文件和目录。然后转到依赖项
(在项目结构窗口中,左侧模块的右下方)并单击主项目(可能是应用程序
),然后在声明的依赖项
(右侧的窗口)中单击+
图标并将AAR文件添加到主项目中
用于导入AAR文件的Android Studio结构与软件生产商声明的不同(实现文件树(包括:[xxx.AAR'],dir:'libs'
)但是正在工作。我也遇到了同样的问题。我试图根据producent的用户手册将aar
文件添加到我的项目中。不幸的是,gradle抛出了这个错误,我找不到解决方案
我所做的就是通过Android Studio向导添加引用,使其运行
转到File->ProjectStructure
。单击左侧的Modules
,然后单击Modules
部分的+
图标。选择Import.JAR/.AAR包
。Android Studio将为您的AAR
文件创建一些渐变文件和目录。然后转到依赖项
(在“项目结构”窗口中,右侧模块下方左侧)并单击您的主项目(可能是应用程序),然后在声明的依赖项(右侧的窗口)中,单击+
图标并将您的AAR文件添加到主项目中
用于导入AAR文件的Android Studio结构与软件生产商声明的不同(实现文件树(包括:[xxx.AAR'],dir:'libs'
)但是它起作用了。这能回答你的问题吗?你好,莫达凯,你找到解决办法了吗?我有同样的问题:|这能回答你的问题吗?你好,莫达凯,你找到解决办法了吗?我有同样的问题:|