当前位置: 首页 > 知识库问答 >
问题:

“C:\Users\HP\AppData\Local\Android\SDK2\Build-Tools\23.0.3\Aapt.exe”已完成,退出值为非零%1

宋景福
2023-03-14

我在stackoverflow上搜索了很多,但在我的案例中没有一个解决方案起作用。我想做一个简单的媒体播放器,从原始源播放音频。我的原始文件夹大小约为2 GB。当我尝试清理和重建我的项目时,它显示错误

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
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
<?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>

我的建筑.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'
    }
}

共有1个答案

冯卓
2023-03-14

清理项目将起作用。做到:

Build -> Clean Project

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

 类似资料: