与非零退出值完与非

2023-09-11 12:39:34 作者:玻璃年纪i

我试图导入我的项目。 但是当我跑我收到以下错误的应用程序:

错误:执行失败的任务。':应用程序:processDebugResources

  

com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'命令'C:\ Users \用户毗湿奴Ruhela \应用程序数据\本地\机器人\ SDK \集结工具\ 21.1 0.2 \ aapt.exe''与非零退出值完成1

这是我的摇篮文件

 应用插件:com.android.application

            安卓{
            compileSdkVersion 21
            buildToolsVersion21.1.2
            defaultConfig {
            的applicationIDcom.example.vishnuruhela.signup
            的minSdkVersion 15
            targetSdkVersion 21
            版本code 1
            VERSIONNAME1.0
            }
            buildTypes {
            推出 {
            minifyEnabled真
            proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'proguard-rules.pro
            }
            }
            productFlavors {
            }
            }

            依赖{
            编译文件树(导演:库,包括:['的* .jar'])
            编译com.android.support:appcompat-v7:21.0.3
            编制项目(:是ListView1)

            }
 

解决方案

我得到这个确切的同样的错误。我跑了命令

  ./ gradlew assembleDebug --info
 

在哪里assembleDebug被替换为我想要的味道调试版本的装配任务。

查找输出

  

成功启动进程的命令/usr/local/opt/android-sdk/build-tools/21.1.2/aapt

下面这项权利,它描述了我使用的布局文件,但是从尺寸文件缺少资源的错误。修复这个固定的构建问题。

WEXITSTATUS这个函数是做什么的

I am trying to import my project. but when I run the application I am getting the following error:

Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Vishnu Ruhela\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non- zero exit value 1

here is my gradle file

            apply plugin: 'com.android.application'

            android {
            compileSdkVersion 21
            buildToolsVersion "21.1.2"
            defaultConfig {
            applicationId "com.example.vishnuruhela.signup"
            minSdkVersion 15
            targetSdkVersion 21
            versionCode 1
            versionName "1.0"
            }
            buildTypes {
            release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
            }
            productFlavors {
            }
            }

            dependencies {
            compile fileTree(dir: 'libs', include: ['*.jar'])
            compile 'com.android.support:appcompat-v7:21.0.3'
            compile project(':listView1')

            }

解决方案

I was getting this exact same error. I ran the command

./gradlew assembleDebug --info

Where "assembleDebug" was replaced with the assemble task for a debug version of the flavor I wanted.

Look for output

Successfully started process 'command '/usr/local/opt/android-sdk/build-tools/21.1.2/aapt''

Right below that was an error describing a resource which I used in a layout file but which was missing from the dimensions files. Fixing this fixed the build issue.