【问题标题】:'C:\Users\HP\AppData\Local\Android\sdk2\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1'C:\Users\HP\AppData\Local\Android\sdk2\build-tools\23.0.3\aapt.exe'' 以非零退出值 1 结束
【发布时间】:2016-07-14 11:43:44
【问题描述】:

我在 stackoverflow 上进行了很多搜索,但在我的情况下没有一个解决方案可以工作。 我想制作一个简单的媒体播放器来播放原始源的音频。我的原始文件夹大小约为 2 GB。当我尝试清理和重建我的项目时,它显示错误

在消息 Gradle 构建中:

Error:Execution failed for task ':app:processDebugResources'.
      com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\HP\AppData\Local\Android\sdk2\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1. 
Information:BUILD FAILED
Information:Total time: 1 mins 54.534 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

Gradle 控制台建议的地方:

FAILURE: Build failed with an exception.

 * What went wrong:
 Execution failed for task  ':app:processDebugResources'.com.android.ide.common.process.ProcessException: 
    org.gradle.process.internal.ExecException: Process 'command 'C:\Users\HP\AppData\Local\Android\sdk2\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1

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

BUILD FAILED

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.owais.surah">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="My Book"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity 
            android:name=".MainActivity">
        </activity>
        <activity android:name=".Splash">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

我的 build.gradle 是

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    dexOptions {
          incremental = true;
          preDexLibraries = false
          javaMaxHeapSize "4g"
    }

    defaultConfig {
         applicationId "com.owais.surah"
         minSdkVersion 15
         targetSdkVersion 23
         versionCode 1
         versionName "1.0"
    }

    buildTypes {
        release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'),              
             'proguard-rules.pro'
           }
    }

    dependencies {
         compile fileTree(dir: 'libs', include: ['*.jar'])
         testCompile 'junit:junit:4.12'
         compile 'com.android.support:appcompat-v7:23.2.1'
    }
}

【问题讨论】:

标签: android android-gradle-plugin


【解决方案1】:

清理项目将起作用。做:

Build -> Clean Project

此错误通常发生在您进行一些复制粘贴工作(例如粘贴图像或其他资产等)时。

【讨论】:

    【解决方案2】:

    Android Studio 只接受特定文件名框架内的图像。 它必须只包含 [a-z0-9_.] 尝试检查您的可绘制对象

    【讨论】:

      【解决方案3】:

      删除 assets 文件夹中标题中包含非英文字符的所有文件

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-11-03
        • 1970-01-01
        • 2018-10-17
        • 2015-09-03
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多