Android studio 错误:任务';的执行失败:app:processDebugResources';

Android studio 错误:任务';的执行失败:app:processDebugResources';,android-studio,Android Studio,两天来,我一直在犯这个错误,我的头撞到了墙上:- 错误:任务“:app:processDebugResources”的执行失败。 com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:process'command'C:\Users\DEL\AppData\Local\android\Sdk\build tools\19.1.0\aapt.exe''以非零退出值1完成 我

两天来,我一直在犯这个错误,我的头撞到了墙上:-

错误:任务“:app:processDebugResources”的执行失败。 com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:process'command'C:\Users\DEL\AppData\Local\android\Sdk\build tools\19.1.0\aapt.exe''以非零退出值1完成

我已经更新了一切“可更新的”,但这仍然困扰着我。我已经更新到android 2.1.2,我在windows 7中。我正在尝试用一个片段构建一个空白的活动,到目前为止我还没有编写任何代码,但该项目就是无法构建

以下是android清单文件:-

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

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

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

</manifest>

任何帮助都将不胜感激

您的
build.gradle
文件显示了
buildToolsVersion“19.1.0”
,并且它是旧的。您应该将其更改为sdk中的
buildToolVersion
的最新版本。因此,现在转到C:\Users\DEL\AppData\Local\Android\Sdk\build tools\目录,并在
build.gradle
文件中将
buildToolsVersion“19.1.0”
更改为该版本。现在选择
Tools->Android->Sync with Gradle dependency
。希望这对您有所帮助。

删除
编译'com.android.support:appcompat-v7:24.0.0-beta1'

appcompat-v7:24.0.0-beta1

不合作
buildToolsVersion“19.1.0”

当我试图运行flifter应用程序时,它也向我抛出了错误。所以我认为答案是正确的,最后我添加了一个新版本(Android API 28)的虚拟设备,并编辑build.gradle以匹配我刚刚安装的版本(28),它成功了。我不确定它是否100%正确,因为您需要在运行应用程序的每台计算机上添加对API的支持,但至少它解决了问题。

我大约在5小时前就知道了,但无论如何,谢谢您
apply plugin: 'com.android.application'
android {
    compileSdkVersion 24
    buildToolsVersion "19.1.0"

    defaultConfig {
        applicationId "com.example.del.sunshine_testapp_vr1"
        minSdkVersion 16
        targetSdkVersion 24
        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:24.0.0-beta1'
    compile 'com.android.support:design:24.0.0-beta1'
}