错误:任务':mobile:processDebugResources'的执行失败。 > com.android.ide.common.process.ProcessException:无法执行aapt

时间:2017-09-18 12:11:09

标签: android android-gradle

在基地build.gradle classpath 'com.android.tools.build:gradle:1.0.0'和apk正在生成。 将gradle更新为'com.android.tools.build:gradle:2.3.3'获取错误后

Error:Execution failed for task ':mobile:processDebugResources'.
 com.android.ide.common.process.ProcessException: Failed to execute aapt 

基 - >的build.gradle:

  buildscript {
      repositories {
      jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.github.jcandksolutions.gradle:android-unit-test:2.1.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
 }

allprojects {

      repositories {
        jcenter()
    }
}

应用 - >的build.gradle:

buildscript {
  repositories {
    maven { url 'https://maven.fabric.io/public' }
  }

  dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
  }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories 
{
 maven 
  { 
   url 'https://maven.fabric.io/public' 
  }
}
android 
{
 compileSdkVersion 25
 buildToolsVersion '25.0.0'

 defaultConfig {
    applicationId "com.aaaa.aaaa"
    minSdkVersion 14
    targetSdkVersion 25
    versionCode 11
    versionName "2.0.0"
    resConfigs "en"
    resConfigs "nodpi", "hdpi", "xhdpi", "xxhdpi"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

 lintOptions {
    checkReleaseBuilds true
    abortOnError false
    disable 'InvalidPackage'
}

 buildTypes {
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'),     'proguard-rules.pro'
        zipAlignEnabled true
        signingConfig signingConfigs.controllerConfig
    }
    debug {
        // Disable fabric build ID generation for debug builds
        ext.enableCrashlytics = false
    }
  }

  }

 apply plugin: 'android-unit-test'

 dependencies {
//compile fileTree(dir: 'lib', include: ['*.jar'])
compile project(':volley')
//Google Actions, Base Client Library
compile 'com.google.android.gms:play-services-base:8.3.0'
//Google App Indexing
compile 'com.google.android.gms:play-services-appindexing:8.3.0'
//Google App Invites
//compile 'com.google.android.gms:play-services-appinvite:7.0.+'
//Google Analytics
compile 'com.google.android.gms:play-services-analytics:8.3.0'
//Google Cast
//com.google.android.gms:play-services-cast:7.5.0
//Google Cloud Messaging
compile 'com.google.android.gms:play-services-gcm:8.3.0'
//Google Drive
// com.google.android.gms:play-services-drive:7.5.0
//Google Fit
// com.google.android.gms:play-services-fitness:7.5.0
//Google Location, Activity Recognition, and Places
compile 'com.google.android.gms:play-services-location:8.3.0'

//Sqlite
//compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'

//compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
//volley
//compile 'com.mcxiaoke.volley:library:1.0.+'

//Fragments n All
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:appcompat-v7:25.1.1'

//Design
compile 'com.android.support:design:25.1.1'
//List n Card
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
//compile 'com.android.support:palette-v7:22.1.1'

//RecyclerView Animation
//compile 'com.github.gabrielemariotti.recyclerview:recyclerview-animators:0.1.0-SNAPSHOT@aar'

//Observable
compile 'com.github.ksoichiro:android-observablescrollview:1.5.0'
compile 'com.melnykov:floatingactionbutton:1.0.7'
//Animation
compile 'com.nineoldandroids:library:2.4.0'
//Event Bus
compile 'de.greenrobot:eventbus:2.4.0'
//Material button
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
//Glide
compile 'com.github.bumptech.glide:glide:3.6.1'
//Fabric
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
    transitive = true;
}
//GSon
//gson
compile 'com.google.code.gson:gson:2.4'
//Rate
//compile 'com.kobakei:ratethisapp:0.0.4'
}

请您指导我克服这些错误

1 个答案:

答案 0 :(得分:1)

检查official doc in github

  

从Android Gradle插件的1.1版开始,本机支持JVM中的单元测试。这就是为什么我弃用这个插件并且不会进一步维护它,这意味着没有错误修复和增强。感谢您持续不断的支持。

同时检查this issue:您的问题:

Error:(76, 0) No such property: bootClasspath for class: com.android.build.gradle.AppPlugin
  

他们更改了该方法的API。此外,他们现在支持单元测试,因此我不会努力使其适用于本地支持它们的版本。如果他们的测试不能按预期工作,那么要么向工具团队提交报告,要么继续使用1.0.0版本。

     

我猜这个插件正在接近其弃用

今天没理由使用此插件进行测试。