提问者:小点点

Android/sdk/build-tools/22.0.1/AAPT“已完成,退出值为非零%1


我在我的项目中遇到了这个问题,我尝试了这个帖子中的解决方案:帖子1帖子2,但对我不起作用。这个项目在Android Studio 1.2版上运行得很好,问题是在我升级到1.3版时开始的

这是我的build.gradle文件

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:1.3.0'

        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.6'
    }
}

repositories {
    mavenCentral()
    mavenLocal()
}

apply plugin: 'com.android.application'
apply plugin: 'android-apt'

android {
    compileSdkVersion 22
    buildToolsVersion '22.0.1'

    defaultConfig {
        applicationId "br.appname"
        minSdkVersion 11
        targetSdkVersion 22
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
        }
    }
}

apt {
    arguments {
        resourcePackageName android.defaultConfig.applicationId
        androidManifestFile variant.outputs[0].processResources.manifestFile
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    apt "org.androidannotations:androidannotations:3.3.2"

    compile 'org.androidannotations:androidannotations-api:3.3.2'
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'com.google.android:support-v4:r7'
    compile 'com.loopj.android:android-async-http:1.4.8'
    compile 'commons-lang:commons-lang:2.6'
    compile 'com.crittercism:crittercism-android-agent:5.2.0'
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'

    compile files('libs/android-smart-image-view-1.0.0.jar')
    compile files('libs/libGoogleAnalyticsServices.jar')

    compile 'com.android.support:support-v4:21.0.0'
    compile "com.android.support:appcompat-v7:21.0.0"


}

完全错误是这样的:

错误:任务“:AppName:ProcessDebugResources”执行失败。com.android.ide.common.Process.processException:org.gradle.Process.internal.execException:进程“command”/home/user/android/sdk/build-tools/22.0.1/aapt“已完成,退出值为非零%1

在gradle console中,我有以下错误:

:AppName:ProcessDebugResources

AGPBI:{“kind”:“simple”,“text”:“/home/user/desktop/projects/umobile/trunk/uniformobile/build/intermediates/res/merged/debug/mipmap-xhdpi-v4/ic_launcher.png:错误:重复文件.”,“sources”:[{}]}

AGPBI:{“kind”:“simple”,“text”:“/home/user/desktop/projects/umobile/trunk/uniformobile/build/intermediates/res/merged/debug/mipmap-xhdpi/ic_launcher.png:此处为原始文件。可能隐含了版本限定符。”,“sources”:[{}]}

我该怎么解决这个?


共1个答案

匿名用户

问题解决了!

我只是在结尾处用-v4重命名了mipmap文件夹。