앱 실행 실패 앱 : processDebugResources Android Studio
다른 개발자와 함께 작업 할 수 있도록 비트 버킷을 사용하고 있지만 완벽하게 작동 할 수없는 것 같습니다. 그에게서 변경 사항을 가져온 후이 오류가 발생했습니다.
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
E:\Program Files (x86)\Android\android-sdk\build-tools\19.0.0\aapt.exe package -f --no-crunch -I E:\Program Files (x86)\Android\android-sdk\platforms\android-19\android.jar -M E:\Documents\smart-my-job1\app\build\manifests\debug\AndroidManifest.xml -S E:\Documents\smart-my-job1\app\build\res\all\debug -A E:\Documents\smart-my-job1\app\build\assets\debug -m -J E:\Documents\smart-my-job1\app\build\source\r\debug -F E:\Documents\smart-my-job1\app\build\libs\app-debug.ap_ --debug-mode --custom-package com.smartmyjob
Error Code:
-1073741819
나를 위해 buildTools 버전을 다음과 같이 변경하는 데 도움이되었습니다.
buildToolsVersion "21.0.1"
이 설정은 파일 안에 있습니다 app/build.gradle
.
https://code.google.com/p/android/issues/detail?id=42752 버그가 발생했습니다 . 원인은 일반적으로 메뉴 리소스 중 하나에 존재하지 않는 문자열에 대한 참조 인 것 같습니다.
나를 위해 32 비트 종속성을 설치하는 것을 잊어 버렸습니다.
sudo apt-get install -y lib32gcc1 libc6-i386 lib32z1 lib32stdc++6
sudo apt-get install -y lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev
aapt는 32 비트이므로 32 비트 아키텍처가 활성화 될 때까지 64 비트 상자에서 실행되지 않습니다.
dpkg --print-foreign-architectures # if prints nothing then below is fix
sudo dpkg --add-architecture i386 # add a 32 bit architecture to box
sudo apt-get install -y lib32gcc1 libc6-i386 lib32z1 lib32stdc++6
sudo apt-get install -y lib32ncurses5 lib32gomp1 lib32z1-dev
그것은 나를 위해 작동합니다.
나는 같은 문제가 있었고 그것을하고 수정했다 ./gradlew clean build
! 시도해보십시오. 그래도 효과가 없으면 시도해보십시오 ./gradlew --refresh-dependencies
.
내 답변이 너무 늦게 보일 수 있지만 SDK를 API 21로 업그레이드 한 후 Android Studio에서 이와 동일한 오류가 발생했습니다 . 이 사이트와 https://code.google 에서 여기에 온 모든 솔루션을 시도했습니다 . COM / P / 안드로이드 / 문제 / 세부 사항? ID = 61308 . 결과적 으로이 오류를 해결하는 방법은 다음과 같습니다. 앱의 gradle.build 파일을 열고 다음과 같이 변경했습니다.
android {
compileSdkVersion 21
buildToolsVersion "21.0.0"
defaultConfig {
applicationId "com.abundantideas.layoutsample"
minSdkVersion 8
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
그것에 :
android {
compileSdkVersion 21
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.abundantideas.layoutsample"
minSdkVersion 8
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
업그레이드 전에 buildToolsVersion 및 targetSdkVersion 값을 20으로 낮추었습니다. 필자의 경우 API 21이 Gradle에 문제를 일으키는 것으로 보입니다. 이것이 다른 사람들에게도 도움이되기를 바랍니다.
필자의 경우 프로젝트를 정리하고 (메뉴 막대-> 빌드-> 프로젝트 정리) 다시 빌드했습니다. 효과가있었습니다.
내 경우에는 Android Studio 3.1.2에서 즉시 실행 비활성화로 문제가 해결되었습니다.
SDK 저장소를 업그레이드 한 후 app : processDebugResources Android Studio 실행에 실패했습니다. Android Studio 1.5.1, 대상 SDK 버전 23을 사용합니다. 이전에 buildToolsVersion 21.0.1을 사용하고 있었으며 buildToolsVersion을 21.1.2로 변경하면 문제가 해결되었습니다.
내가 버전 21.1.2를 찾는 방법을 원할 수도 있습니다. SDK를 성공적으로 업그레이드 한 후 Android Studio에서 권장했습니다.
buildToolsVersion을 21.1.2 (아래 내 버전 설정 참조)로 변경 한 후 Gradle 빌드 메커니즘을 동기화해야합니다.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "mm.weboffice"
minSdkVersion 14
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'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
}
Android Studio will prompt you to sync Gradle or you can go to "menubar > File > Synchronize" to trigger synchronization manually. Android Studio will rebuild your project after the synchronization.
I know there are many issues with the SDK database and configuration, my proposed solution may not fix all problems. But if you encounter the similar error after upgrading SDK repository, I hope my post solve your hassle. Good luck!
In my case I tried to change buildToolsVersion
in gradle
, but it didn't help me. My problem was fixed when I found drawable which called example.PNG. It should be example.png; There were no messages about wrong resource name, but after I renamed file, gradle built project fine.
If it is not your build tools, check your strings, styles, attrs, ... XML files and ensure they are correct. For example a string with an empty name-attribute
<string name="">Test"</string>
or a previously undefined attr without a format specified (attrs.xml):
<declare-styleable name="MediaGridView">
<attr name="allowVideo"/>
</declare-styleable>
Banged my head around this for 2 days.
TL;DR - Got this error since My app name contained '-'.
Turn out android does not allowed that. After running gradlew build --stacktrace
inside android directory - got an error that implies that.
In my case i had two declaration of
<?xml version="1.0" encoding="utf-8"?>
in my vector drawable icon
all i had to do was delete one
Getting this error, I did a build with --info (gradle --info build). It reported that it could not open libz.so.1, due to wrong ELFCLASS. It needs a 32 bit version of libz. I had to download the source, change the Makefile to gcc -m32, and install the 32 bit glibc development package (dnf install glibc-devel.i686). After making and installing this 32 bit library, I disabled the 64 bit one.
Then all went well.
I had the same problem, and since this question was the first hit on google, I'll add my solution too. For me, it was a missing format
attribute in an attr
element in res/values/attrs.xml
.
This worked for me just by restarting android studio 2 times :D. I'm using Android Studio 2.1.
I solved it by changing build tools version 21.0.1 to 20.0.0
Run gradle with --stacktrace
option to see more information, what's wrong.
it may help in the android studio 3.2.1 app build gradle it should be like
android {
compileSdkVersion 27
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.sample.mvphelloworld"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
}
Gradle to 4.6
plugin version to 3.2.1
In my case, crashlytics (Fabric.io) was generating files that conflicted at some point and a second file was automatically generated with an invalid name.
Long story short: Check if you don't have any filenames with invalid lengths, you should be warned above the original exception.
I got this problem after deleting the logs I resolved this by rebuilding the project
go to Gradle panel and run it by double click on it on message line it show you where your project are error for example maybe you have a sound or movie or a file or ... that it compact in your project on the google android i'm really sorry that my English is really very poor
You get this error when you use Java keywords in your resources name.
Had the same problem. I changed the file build.gradle inside the app folder from this: compileSdkVersion 23 buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.vastsoftware.family.farmingarea"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
to this:
compileSdkVersion 23 buildToolsVersion "21.0.2"
defaultConfig {
applicationId "com.vastsoftware.family.farmingarea"
minSdkVersion 11
targetSdkVersion 21
versionCode 1
versionName "1.0"
and worked perfectly! hope it works for you too!
I had Same problem and soved by moved
ic_launcher.png files from drawable folder to mipmap folder.
For me it was an error with my resources, Just changed the resources of my project in resources folder and res folder(i.e. for android) and it worked fine.
Build Successful
Total Time: 1 min 10.034 secs
There may be some errors in your layouts like android:id="@id/
instead of android:id="@+id/...
. At least that was the cause for my exception.
Check if any SDK platform was partially installed. If it does, reinstall it.
I stumbled upon this error while updating my Android studio to 3.0.1 from 2.3. After trying all the solutions above, i found that the issue was with the Build tools version. I was using an unsupported version of build tools. I changed mine as below and it worked.
buildToolsVersion '26.0.2'
As a rule of thumb always try to use the latest version of Build tools supported by your Gradle version. From version 3.0.0 of Gradle, you don't need to specify the build tools version as this is picked up automatically.
3.0.0 (October 2017) : Android plugin for Gradle 3.0.0
이 업데이트에서는 더 이상 빌드 도구의 버전을 지정할 필요가 없습니다. 플러그인은 기본적으로 필요한 최소 버전을 사용합니다. 이제 android.buildToolsVersion 속성을 제거 할 수 있습니다.
https://developer.android.com/studio/releases/gradle-plugin.html#3-0-0
나를 위해 관리 모드에서 Android Studio를 실행해야했습니다.
윈도우 10 x64
'programing tip' 카테고리의 다른 글
요소 이름에 대한 사례 규칙? (0) | 2020.07.18 |
---|---|
cmd에서 PATH 변수를 영구적으로 업데이트하는 방법은 무엇입니까? (0) | 2020.07.18 |
jQuery ajax 함수의 contentType과 dataType의 차이점 (0) | 2020.07.18 |
한 줄에 Java 로깅 출력을 표시하려면 어떻게합니까? (0) | 2020.07.18 |
여러 개의 태그를 선택하는 XPath (0) | 2020.07.18 |