aapt

How to use aapt2, where is the documentation?

谁说我不能喝 提交于 2019-11-27 02:39:06
问题 I have used aapt p to package resources and generate R.java . But when I upgraded to Android 24, I found aapt2.exe . Should I use aapt2.exe ? How do I use it? I could not find any documentation about it. 回答1: There are some big differences between how AAPT and AAPT2 work. Compile and link The main idea behind AAPT2, apart from new features, is that it divides the 'package' step into two: 'compile' and 'link'. It improves performance, since if only one file changes, you only need to recompile

Gradle finished with non-zero exit value 1 (ic_launcher.png: error: Duplicate file)

落爺英雄遲暮 提交于 2019-11-26 23:54:39
I got this strange error with gradle, please help me! /.../app/build/intermediates/res/debug/drawable-xxhdpi-v4/ic_launcher.png: error: Duplicate file /.../app/build/intermediates/res/debug/drawable-xxhdpi/ic_launcher.png: Original is here. The version qualifier may be implied. Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/.../sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1 Before it was operating normally, but since I put classpath com.android.tools

Android Studio 3.0 Manifest Error: unknown element <action> found

落花浮王杯 提交于 2019-11-26 20:41:29
NOTICE: Please do not post this "android.enableAapt2=false" as an answer. It is not a solution. It is just ignoring the real error which is not causing any problem on runtime. Solution was simple, just removed mistakenly placed action tag outside of an intent filter in the manifest file. Have an application which was building by Android Studio 2.3 fine. After updating Android Studio 3.0 Stable , started to having this error and unable to build my project. Here my manifest.xml <application android:name=".ApplicationClass" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android

How to install Android SDK Build Tools on the command line?

五迷三道 提交于 2019-11-26 19:10:49
I want to setup the Android dev environment from command line, and encounter the following issue: wget http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz after extract the file, run tools/android update sdk --no-ui However, it is too slow on running Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml The result is that nothing in folder build-tools, and I want is aapt and apkbuilder, since I want to build apk from command line without ant. Nate By default, the SDK Manager from the command line does not include the build tools in the list. They're in the "obsolete"

9-patch image error in Android

大兔子大兔子 提交于 2019-11-26 19:05:24
问题 Whenever I try to add a 9-patch image to the \drawable folder in my project, I get the same error: ERROR: 9-patch image C:\...\res\drawable\appwidget.9.png malformed. Frame pixels must be either solid or transparent (not intermediate alphas). Found at pixel #3 along top edge. Failure processing PNG image C:\...\res\drawable\appwidget.9.png The weird thing in this example is that I've got this image from the "android-g1-icon" images found in the SDK resources, so it is supposed to be OK. The

AAPT2 compile failed: invalid dimen on Android 3.0 Canary 1

此生再无相见时 提交于 2019-11-26 18:53:20
问题 I am playing around with Instant Apps for Android.I installed all the correct packages and tired to create new Application with Instant App support (checked the box for Instant App when crating new application). The problem is that I always run into a problem with compile tools. Does anybody else have this problem and was able to find any workaround. My environment: Android Studio 3.0 Canary 1 Compile SDK: 25 Build Tools: "26.0.0 rc2" Gradle plugin:3.0.0-alpha1 Gradle: tried both gradle-4.0

Programmatically change the value of a color resource obtained from API response

自古美人都是妖i 提交于 2019-11-26 18:48:42
Let's say, on my API call I have a parameter that's called color . Is it possible to edit or modify an existent R.colors.color to assign the color from the API result? As an example: I make a call to my API and it returns green , now I want to load my app with i.e (green Toolbar , green TextView color, etc.), is that possible? My first thought was: Create a item on colors.xml called demo then assign it a default color, then use this demo color wherever I want ( Button , TextView , etc.) Then I thought it could be possible to change this value programmatically with the result from the API so I

“aapt” IOException error=2, No such file or directory" why can't I build my gradle on jenkins?

安稳与你 提交于 2019-11-26 18:48:23
问题 I have a little problem. The Problem: I am trying to build a gradle of my Android Project on Jenkins and now I am standing on this problem i can't resolve. During the Building I have this Error message: :Client:mergeDebugResources /var/lib/jenkins/workspace/LMA-Client/Client/build/exploded-aar/com.google.android.gms/play-services/3.1.59/res/drawable-hdpi/common_signin_btn_text_focus_light.9.png: Error: Cannot run program "/opt/android-sdk/build-tools/19.0.1/aapt": java.io.IOException: error=2

aapt not found under the right path

泪湿孤枕 提交于 2019-11-26 17:43:32
问题 I just updated ADT, than the SDK and now I have in only one project the issue, that my aapt isn't found Error executing aapt. Please check aapt is present at /opt/android/platform-tools/aapt The path is correct, I checked twice and more times. -rwxrwxrwx 1 martin martin 3,5M 2010-12-08 10:41 /opt/android/platform-tools/aapt I can start aapt via console, the permissions are 777, I restarted eclipse, closed/reopened the project, restarted adb and finally my Ubuntu. Some ideas why this might

Android Packaging Problem: resources.ap_ does not exist

余生长醉 提交于 2019-11-26 16:41:45
问题 I am trying to fix a problem in Eclipse for like 3 hours and I haven't made any progress. Tomorrow is the customer coming to look at my app, and I have no time left. This is really frustrating! This morning when I was coding and I wanted to run my app on my device Eclipse crashed all of a sudden. 'aapt.exe has stopped working' After this Eclipse wasn't starting anymore. It froze at the splash image. I looked on the internet and tried different solutions like going back to Java SE 6 update 20,