GVKun编程网logo

AndroidStudio3.0 Error:Execution failed for task '':app:processDebugResources''.

12

此处将为大家介绍关于AndroidStudio3.0Error:Executionfailedfortask'':app:processDebugResources''.的详细内容,此外,我们还将为您

此处将为大家介绍关于AndroidStudio3.0 Error:Execution failed for task '':app:processDebugResources''.的详细内容,此外,我们还将为您介绍关于Android Error:Execution failed for task '':app:compileDebugJavaWithJavac'' 解决方案 总结、Android Error:Execution failed for task '':app:preDebugAndroidTestBuild''. > Conflict wi...、Android Studio Error:Execution failed for task '':app:preDebugAndroidTestBuild''. 彻底解决的方法以及修...、Android Studio Gradle - 任务':app:processDebugManifest' 的配置发现问题的有用信息。

本文目录一览:

AndroidStudio3.0 Error:Execution failed for task '':app:processDebugResources''.

AndroidStudio3.0 Error:Execution failed for task '':app:processDebugResources''.

android studio 

Information:Gradle tasks [:app:assembleDebug]

app\build\intermediates\manifests\full\debug\AndroidManifest.xml

Error:(27) error: unknown element <category> found.
Error:(27) unknown element <category> found.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task '':app:processDebugResources''.
> Failed to execute aapt
Information:BUILD FAILED in 10s
Information:6 errors
Information:0 warnings

Information:See complete output in console

 

解决方法 :

add this code in gradle.properties in the root project:

org.gradle.jvmargs=-Xmx1536m
android.enableAapt2=false

 

Android Error:Execution failed for task '':app:compileDebugJavaWithJavac'' 解决方案 总结

Android Error:Execution failed for task '':app:compileDebugJavaWithJavac'' 解决方案 总结

1、升级更新buildToolsVersion 到最新版本
2、升级Android Studio 2.2.2版本,JDK 1.8版本
3、配置JAVA_HOME路径

然并卵没有解决我个人的问题

 

gradlew compileDebug --stacktrace 可以用于查看堆栈的错误信息,然后再去网上继续找寻错误信息。

把命令gradlew compileDebug --stacktrace 改成 gradlew compileDebugJavaWithJavac

居然把具体的错误信息打印出来了

然后更改,解决问题

像我遇到的问题是,刷新的时候都没有问题,运行的时候就出现我们标题的问题,然而解决了几次这样错误以后,发现一般来说只有manefest的权限重复这种类型错误,不打印错误信息出来,是看不到真正的错误的。gradle和studio升级版本越来越高以后,对权限要求都不能重复了,感觉算不算坑,有点追求完美?以前版本是可以兼容,内部应该帮你合并了的。

 

环境:studio3.0.1  gradle 4.1版本

Android Error:Execution failed for task '':app:preDebugAndroidTestBuild''. > Conflict wi...

Android Error:Execution failed for task '':app:preDebugAndroidTestBuild''. > Conflict wi...

错误内容:

Error:Execution failed for task '':app:preDebugAndroidTestBuild''.
> Conflict with dependency ''com.android.support:support-annotations'' in project '':app''. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

 

我们寻找External Libraries中的27.1.1版本,删掉就行了

最后在build.gradle中添加如下代码

androidTestCompile(''com.android.support:support-annotations:26.1.0'') {
        force = true
    }

 

Android Studio Error:Execution failed for task '':app:preDebugAndroidTestBuild''. 彻底解决的方法以及修...

Android Studio Error:Execution failed for task '':app:preDebugAndroidTestBuild''. 彻底解决的方法以及修...

Error

Error:Execution failed for task '':app:preDebugAndroidTestBuild''. > 
Conflict with dependency ''com.android.support:support-annotations'' in project '':app''. 
Resolved versions for app (26.1.0) and test app (27.1.1) differ. 
See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

问题说明

因为使用的依赖包版本不同的原因,所以,我们强制使用一样的版本即可解决问题

在 adroid 结点下添加下述代码

configurations.all {
    resolutionStrategy.force ''com.android.support:support-annotations:26.1.0''
}

把版本号修改一下即可

一劳永逸的办法

上面的办法在当前的项目是已经解决了的,但是,新建一个项目又会出现同样的问题,这就很烦了。

我们直接通过修改新建一个项目的模板,直接把默认的那些设置改了,即可达成一劳永逸

我的版本是 Android Studio 3.0.1 网上查找修改这些默认设置的时候,资料发现不太一样,自己摸索也是找到了关键的地方

找到路径 Android Studio的根目录\plugins\android\lib\templates\gradle-projects\NewAndroidModule\rootshared_macros.ftl 文件,上面自己需要的代码复制在 android 结点下即可

扩展,修改 buildToolVersion targetVersion gradleVersion 等默认版本

  • appcompat 版本号 -- Android Studio的根目录\plugins\android\lib\templates\gradle-projects\NewAndroidModulerecipe.xml.ftl

    <#if backwardsCompatibility!true> <dependency mavenUrl="com.android.support:appcompat-v7:25.3.1" /> </#if>

  • compileSdkVersion,buildToolsVersion,targetSdkVersion 等版本号 -- Android Studio的根目录\plugins\android\lib\templates\gradle-projects\NewAndroidModule\rootshared_macros.ftl

      android {
          compileSdkVersion 25
          <#if compareVersions(gradlePluginVersion, ''3.0.0'') lt 0>buildToolsVersion 27.0.1</#if>
    
          <#if isBaseFeature>
          baseFeature true
          </#if>
    
          defaultConfig {
          <#if hasApplicationId>
              applicationId "${applicationId}"
          </#if>
              minSdkVersion <#if minApi?matches("^\\d+$")>${minApi}<#else>''${minApi}''</#if>
              targetSdkVersion 25
              versionCode 1
              versionName "1.0"
    

小工具(懒人必备)

AlterASDefaultSetting

Android Studio Gradle - 任务':app:processDebugManifest' 的配置发现问题

Android Studio Gradle - 任务':app:processDebugManifest' 的配置发现问题

如何解决Android Studio Gradle - 任务'':app:processDebugManifest'' 的配置发现问题?

几个月前我已经遇到了这个错误,“解决方案”是降级 gradle。一段时间后,由于某种原因,我可以使用最新版本,一切正常。

直到现在,我再次收到此错误消息,但无法再次降级 gradle,因为某些最新插件将不再可用,我也必须将它们降级。

我只是想让这堆叫做 android studio 的垃圾在他们最新的 bs 上正常工作!

我该如何解决这个问题??

这是错误:

A problem was found with the configuration of task '':app:processDebugManifest'' (type ''ProcessMultiApkApplicationManifest'').
  - In plugin ''com.android.internal.version-check'' type ''com.android.build.gradle.tasks.ProcessMultiApkApplicationManifest'' property ''mainMergedManifest'' specifies file ''G:\projekte\ANDROID\xxxx\app\build\intermediates\merged_manifest\debug\AndroidManifest.xml'' which doesn''t exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

我也收到警告:

The ''kotlin-android-extensions'' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the ''kotlin-parcelize'' plugin.

当我“运行”建议时,我得到:

enter image description here

它说一些 navigation.json 无法找到,这到底是什么

解决方法

好的,问题是因为项目文件在不是 ntfs 的 USB 驱动器上,将它们移动到 ntfs 驱动器修复了它

今天关于AndroidStudio3.0 Error:Execution failed for task '':app:processDebugResources''.的讲解已经结束,谢谢您的阅读,如果想了解更多关于Android Error:Execution failed for task '':app:compileDebugJavaWithJavac'' 解决方案 总结、Android Error:Execution failed for task '':app:preDebugAndroidTestBuild''. > Conflict wi...、Android Studio Error:Execution failed for task '':app:preDebugAndroidTestBuild''. 彻底解决的方法以及修...、Android Studio Gradle - 任务':app:processDebugManifest' 的配置发现问题的相关知识,请在本站搜索。

本文标签: