簡體   English   中英

完成'C:\\ Users \\ HP \\ AppData \\ Local \\ Android \\ sdk2 \\ build-tools \\ 23.0.3 \\ aapt.exe'',退出值非零

[英]'C:\Users\HP\AppData\Local\Android\sdk2\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1

我已經在stackoverflow上進行了很多搜索,但就我而言,沒有一個解決方案可用。 我想制作一個簡單的媒體播放器,從原始源播放音頻。 我的原始文件夾大小約為2 GB。 當我嘗試清理並重建項目時,顯示錯誤

在Message Gradle Build中:

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

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'
    }
}

清理項目即可。 做:

Build -> Clean Project

當您執行某些復制粘貼工作(例如粘貼圖像或其他資產等)時,通常會出現此錯誤。

Android Studio僅接受特定文件名框架內的圖像。 它只能包含[a-z0-9_。]嘗試檢查可繪制對象

刪除資產文件夾中標題中包含非英語字符的所有文件

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM