Android Hello-World compile error: Intellij cannot find aapt - android

I'm trying to get set up with an Android development environment using IntelliJ in Ubuntu 12.04. I create an Android Application Module, but when I try to build, I get the following error:
android-apt-compiler: Cannot run program "/home/jon/Programs/android-sdk-linux/platform-tools/aapt": java.io.IOException: error=2, No such file or directory
Several hours of scouring the internet hasn't helped.
By the way, I ran locate aapt in the terminal and found that aapt is located at /home/jon/Programs/android-sdk-linux/build-tools/17.0.0/aapt

It appears that the latest update to the r22 SDK release moved aapt and the lib jar from the platform-tools to the build-tools directory. While we wait for JetBrains to release an update, here's a quick fix using a couple of symbolic links:
From your AndroidSDK/platform-tools directory, run the following:
ln -s ../build-tools/17.0.0/aapt aapt
ln -s ../build-tools/17.0.0/lib lib
...and IntelliJ should be able to compile as normal.

update your IntelliJ to 12.1.4 by using beta releases as the update channel

In Windows it is enough to copy only aapt.exe, lib\dx.jar and dx.bat
from build-tools\android-4.2.2
to
platform-tools

The same problem occurred for me with android-studio. But, this probably applies to the IntelliJ IDE as well.
When checking the file location I saw, however, that aapt was in the expected location.
In my case the issue was that I was running a 64-bit Ubuntu linux system which cannot execute the 32-bit aapt executable.
Installing 32-bit compatibility libraries solved this issue in my case: sudo apt-get install ia32-libs

i solve it with this to line commands
ln -s ~/Programs/android-sdk-linux/build-tools/17.0.0/aapt ~/Programs/android-sdk-linux/platform-tools/aapt
ln -s ~/Programs/android-sdk-linux/build-tools/17.0.0/lib ~/Programs/android-sdk-linux/platform-tools/lib

I also noticed it.
ADT has been updated and they added this new build-tools where they moved everything.
Intellijidea is not updating paths so it's searching aapt in the old path.
I don't know how to solve it, so let me know if you find a solution...
UPDATE:
I think that you have only 2 options:
1) Use Android Build studio: http://developer.android.com/sdk/installing/studio.html
2) Copy (this is dirty but works) all content from build-tools/17.0.0/ to platform-tools/ and it will build

To complain to Jetbrains, go here: http://youtrack.jetbrains.com/issue/IDEA-107311
I reckon more votes will be a faster fix.

Thanks for the tip! On a mac running the Android 4.2.2 SDK, this worked great. You'll just need to update your paths accordingly. E.g.
ln -s ../build-tools/android-4.2.2/lib lib
ln -s ../build-tools/android-4.2.2/aapt aapt

I ran into this issue but with android-maven-plugin
and as a variant of your item #2 rather than copying the file(s) I simply created a symbolic/soft link for aapt
cd platform-tools
ln -s ../build-tools/17.0.0/aapt ./
This approach seemed to get all my builds functioning again.

Clone the android-maven-plugin on GitHub and install it in your repo
git clone https://github.com/jayway/maven-android-plugin.git
cd .../maven-android-plugin/
mvn clean install
Then update your pom to use version 3.5.4-SNAPSHOT of the plugin.
Everything should work properly !

I ran these three commands and my problem was resolved
mklink "%ANDROID_HOME%\platform-tools\aapt.exe" "%ANDROID_HOME%\build-tools\17.0.0\aapt.exe"
mklink /D "%ANDROID_HOME%\platform-tools\lib" "%ANDROID_HOME%\build-tools\17.0.0\lib"
mklink "%ANDROID_HOME%\platforms\android-17\tools" "%ANDROID_HOME%\build-tools\17.0.0\aidl.exe"
If you haven't set ANDROID_HOME Environmental variable the replace %ANDROID_HOME% with the path to your android SDK e.g. C:\Android\android-sdk

On Mac OS you need to
$ cd platform-tools
$ ln -s ../build-tools/android-4.2.2/aapt aapt
$ ln -s ../build-tools/android-4.2.2/lib lib

Goodlife once again.
Just incase of such an error clean project and you are good to go.

Related

Unable to find bundled Java version with flutter doctor, after updating Android studio Arctic Fox(2020.3.1) on M1 Apple Silicon

I'm facing a weird issue. Before I updated my Android Studio, everything went fine in flutter doctor. Once I've updated Android Studio, when I run the doctor, it's showing "Unable to find bundled Java version". I've already downloaded Java installer and installed it on my M1 Mac, but after I restarted, running flutter doctor still shows the same error. The weird thing is, when I uninstall the Arctic Fox version and re-install the older Android Studio version, everything goes fine again when running the doctor. How can I resolve this?
The answer is already posted here.
For Mac User:
Set Java_Home path using below article & then after applying this command.
after that type below command in terminal:
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
flutter doctor -v
If you are using Android Studio Electric Eel | 2022.1.1.
On Mac
Open "Applications" in Finder. Then right click on Android Studio, select "Show Package Contents".
Inside it, open the "Contents" folder. Inside it you will see folder with named "jbr".
Simply duplicate the "jbr" folder. Then, rename the copy folder to "jre".
Then, flutter doctor. The "Unable to find bundled Java version" warning will disappear.
Thanks to #Javi for provided with alternative method.
For Step 2 & 3, ln -s jbr jre also can get the job done. And I think this is the best method to do.
Here is a little fuller answer for everything I had to do to get Android Studio set up on my M1.
Install Android Studio to the Applications folder
Create a symbolic link to from the jre folder to a new jdk folder. (Due to this bug)
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
Set the JAVA_HOME environment variable
nano ~/.zshrc
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
source ~/.zshrc
Install Android SDK Command-line Tools (needed for accepting license)
At this point it should work now (assuming you've also added flutter to your path)
flutter doctor
This is the Windows fix, and it appears to work for me. I am using Android Studio2022.1.1.19
First, right-click the Android Studio icon and open the file directory(location). Your installation folder should be at "C:\Program Files\Android\Android Studio".
When you are already at the Android Studio installation root folder, you will see two folders: "jbr" and "jre".
Copy all the files inside the "jbr" folder to the "jre" folder, then try it again.
Note: This fix is working on my end; just comment down below if it didn`t work on your end.
I did install a fresh version of JAVA SDK, flutter, Android Studio and run the below command directly on the terminal one by one to fix 'Unable to find bundled Java version. ' issue.
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
flutter doctor -v
Now, you should be able to see the error is disappeared in flutter doctor description in terminal.
Run Flutter doctor, if there´s an error indicating that the java bundled can´t be found (specially if you have Android Studio version Artic Fox), run this commands if using Mac:
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
Flutter Doctor
This solution is for M1 Mac User
Find your local Java version by typing /usr/libexec/java_home -V. If didn't exist, install the latest ARM Java version here
Set Java_Home path (in my case jdk-17.0.1.jdk) by typing /usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
Type all of these in terminal
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
Finally run flutter doctor -v to see all the details changes
In my case, on a macOS Ventura with Intel processor, I had to follow the steps below in order to make Flutter work after upgrading Android Studio to Electric Eel:
cd /Applications/Android\ Studio.app/Contents/
ln -s jbr jre
flutter config --android-studio-dir /Applications/Android\ Studio.app/Contents
Step 3 was important, without it flutter doctor --android-licenses would always fail...
I had the same error after updating Android Studio to 2020.3.1 Patch 3 (on MAC).
After upgrading Flutter from 2.2.2 to 2.5.3 problem was solved.
I also installed "Android SDK Command-line Tools". It's installation is explained here: https://stackoverflow.com/a/68492909/6839552
The accepted solution worked with a slight modification for me. I had to add the -f (or use --force) option to make it work (this is because ln failed with file exists and I kept ignoring that - the existing file must have had a problem).
cd /Applications/Android\ Studio.app/Contents/jre
ln -s -f ../jre jdk
ln -s -f "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
flutter doctor -v
I'm running macOS Monterey
Perhaps the simplest option (MAC):
Navigate to: cd /Applications/Android\ Studio.app/Contents/jre
Create a directory: mkdir jdk
Create a soft link: ln -s Contents jdk/Contents
COPY folder
/Applications/Android Studio Preview.app/Contents/jre/Contents
to
/Applications/Android Studio Preview.app/Contents/jre/jdk/Contents
It's #crzorz 's additional answer worked for me. "YOUR_PATH/flutter/packages/flutter_tools/lib/src/android/android_studio.dart". At the bottom of the file, you'll see lines similar to "globals.fs.path.join(directory, 'jre', 'jdk', 'Contents', 'Home')" which #crzorz mentioned.
These lines clearly show on MacOS (old and new versions) and other OS how "flutter doctor" finds the so-called bundled Java.
I use Android Studio Electric Eel. What I did to fix the issue was "create a symbolic link named jre pointing to jbr". Because folder jbr (JetBean Runtime) has the java.exe and other Java Runtime files, but flutter doctor still tries to find a folder named jre.
Update to:
Android Estudio 2022.1 Electric eel + Java 19 + VS Code + Windows 10 x64
Before: Make sure you have JAVA_PATH correctly
1 - Run CMD as Administrator [Not POWERSHELL, because mklink only work for CMD]
2- Run the mklink /d "C:\Program Files\Android\Android Studio\jre" "C:\Program Files\Android\Android Studio\jbr"
3- Run command flutter doctor and Problem solved, but then apears the licenses problem, so
4- Run command flutter doctor --android-licenses wait and accept all
Other way doesn't work, thrown a error: " bla bla bla...already exist..." why?
Because the structure of mklink command: mklink [OPTIONS: /d /j /h rd del] "Path+Name folder/file you want {jre}" "Path+Name folder/file linked {jbr}"
Traduced to human language: Make a Symbolic link [mklink /d] "there with the name jre" to the folder "that is there with the name jbr"
Make sure to use "double quotes" for the files paths and say "please" and not "Just do it" (cmd smell your hurry).
If you dont do it like this, will have problems with sdkmanager and launch devices, because the new Android Estudio don't use jre and that's why many android devices don't launch, and have the 60 second problem.
Copying all contents of JDK and pasting it into a JRE file, worked for me.
After that, I updated my ENV path.

Gradle, Android and the ANDROID_HOME SDK location

edit: (aug-2016)
That question is from November 2013 (while Android Studio was still in Developer Preview mode),
Currently (AS v2.2, Aug-2016) during instalation AS asks to choose the SDK folder (or install on their default) and it automatically applies to which ever project you're opening.
That means any possible workaround or fix is irrelevant as the issue is not reproducible anymore.
original question:
we have this project with several modules that is already configured and executes correctly on another developer PC using a wrapper. I cloned the complete git submodules into my machine.
Below it's a directly print of my command line:
$ ./gradlew
FAILURE: Build failed with an exception.
* Where:
Build file '/home/budius/project_name/ActionBar-PullToRefresh/library/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':ActionBar-PullToRefresh:library'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 6.378 secs
$ echo $ANDROID_HOME
/home/budius/Applications/android-studio/sdk
$
so, as you can see the ANDROID_HOME is there. What else do they want? What's wrong here.
running on Ubuntu 13.04
edit:
I already created a local.properties file with sdk.dir=<path> on the project root and it works. But that makes the code harder to port across systems n build server, so the question is still open.
Anyone knows why the ANDROID_HOME is not working and what to do to make it work?
In /my_current_project/, I created a file called local.properties and put inside:
sdk.dir=/my_current_path_to/sdk
In the console I need to do:
set ANDROID_HOME=/my_current_path_to/sdk
On OSX, IntelliJ won't pick up the environment variables you set in your .bash_profile or .bash_rc etc...
Try this, substituting the value of your own sdk location:
launchctl setenv ANDROID_HOME /usr/local/opt/android-sdk
Then restart IntelliJ and Bob's your uncle.
Here is a reference to the problem, stated more generally:
https://emmanuelbernard.com/blog/2012/05/09/setting-global-variables-intellij/
In my case settings.gradle was missing.
Save the file and put it at the top level folder in your project, even you can copy from another project too.
Screenshot reference:
Hope this would save your time.
This works for me:
$ export ANDROID_HOME=/path_to_sdk/
$ ./gradlew
The Android Gradle plugin is still in beta and this may simply be a bug. For me, setting ANDROID_HOME works, but we may be on different versions (please try again with the most recent version and let me know if it works or not).
It's also worth setting the environment variable ANDROID_SDK as well as ANDROID_HOME.
I have seen issues with this on some machines, so we do create local.properties in those cases - I have also noticed that the latest version of Android Studio will create this file for you and fill in the sdk.dir property.
Note that you shouldn't check local.properties into version control, we have added it to our gitignore so that it doesn't interfere with porting the code across systems which you rightfully identified as a potential problem.
For whatever reason, the gradle script is not picking up the value of ANDROID_HOME from the environment. Try specifying it on the command line explicitly
$ ANDROID_HOME=<sdk location> ./gradlew
I faced the same issue, though I had local.properties file in my main module, and ANDROID_HOME environment variable set at system level.
What fixed this problem was when I copied the local.properties file which was in my main project module to the root of the whole project (i.e the directory parent to your main module)
Try copying the local.properties file inside modules and the root directory. Should work.
I came across the same problem when opening a cloned git repository. The local.properties file is automatically added to the .gitignore file as it is specific to the build environment of each machine and is therefore not part of the repo.
The solution is to import the project instead of just opening it after you have cloned it from git, this forces android studio to create the local.properties file specific to your machine:
File >> Import Project >>
MAC OSX:
Open up Terminal and edit the file:
~/.bash_profile
to add:
export ANDROID_HOME=~/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
Run:
source ~/.bash_profile
Restart the Terminal and Android Studio
How to do it on MAC OSX:
1) Open up Terminal, and Edit: vi ~/.bash_profile If there is no file there, just add it.
2) Add (Change to YOUR USER NAME and add this):
#Java var home:
JAVA_HOME="/usr/libexec/java_home"
ANDROID_HOME="/Users/<YOUR USER NAME>/Library/Android/sdk"
3) Run source ~/.bash_profile.
4) Run echo $JAVA_HOME; echo $ANDROID_HOME;
5) If your output is:
/usr/libexec/java_home
/Users/<YOUR USER NAME>/Library/Android/sdk
So you are good.
and RESTART android studio!
And,
Make sure that you have java :)
java -version
And gradle :)
gradle --version
Copy the local.properties to root folder and run again.
This worked for me (Ubuntu):
Add ANDROID_HOME=/path/to/android-sdk to /etc/environment.
Reboot.
in windows, I set ANDROID_HOME=E:\android\adt-bundle-windows-x86_64-20131030\sdk
Then it works as expect.
When in Linux, you need to set sdk.dir.
The script uses two different variables.
I have the same problem, seems the sample code can not find the android environment, instead to try to fix that I just remove the sample code from settings.gradle and then the installation goes fine.
after that just import the project in eclipse and that's all :)
In Linux, try to run studio.sh from a terminal and set the ANDROID_HOME in this terminal. This worked for me.
If you are using windows plantform, please try run Android Studio as Administrator
Just delete the sdk.dir inside the local.preoperties file and set the ANDROID_HOME environment variable . It worked for me.
export ANDROID_HOME=/xxx/xxx/ in shell, then use it by System.env.ANDROID_HOME in gradle file.
PS: don't forget the 'export' keywords to make the ANDROID_HOME global.
Your local.properties file might be missing. If so add a file named 'local.properties' inside /local.properties and provide the sdk location as following.
sdk.dir=C:\Users\\AppData\Local\Android\Sdk
I have set the ANDROID_HOME = [PATH_OF_MY_ANDROID_SDK] to my environment variable. That solution works for me.
I have just solved the exact same issue by adding the ANDROID_HOME as a system wide variable.
In Ubuntu it should be in /etc/profile or in a shell script file in /etc/profile.d/
Then logout and login again, now Gradle should recognize the ANDROID_HOME variable.
I came across a similar problem. Somehow, I did not have a build folder in my project. By copying this folder from another project to my project I was having an issue with, this fixed this problem.
Installing Build-Tools 23.0.1 instead of 23.0.2 fixed this issue for me.
solutions:
1 add "sdk.dir=path_of_sdk"
2 execute gradlew with evn variable like following:
$ANDROID_HOME=path_of_sdk ./gradlw
You said that versioning local.properties creates problems for you. I've hacked together a script which uses android command line tool to refresh the local.properties file across the machines that are involved in the production. The android update project command, besides the local.properties produces a lot of unwanted trash (at least for me) which is the reason for all those rm commands at the end of the script.
#!/bin/bash
scname="$0"
echo "${scname}: updating local properties..."
ln -fs src/main/AndroidManifest.xml
android update project -t 24 -p "$(pwd)"
echo "${scname}: ...done"
echo "${scname}: removing android update project junk ..."
rm -v project.properties
rm -v build.xml
rm -v proguard-project.txt
rm -v AndroidManifest.xml
echo "${scname}: ...done"
This script is the first thing we run on any new machine where we code. It has to be run in the root project directory. Of course, android studio may have a GUI way of dealing with this, but I wouldn't know as I use a different editor. I also can't claim that the solution is general, but it "Works For Me" (tm).
I have faced with the same issue on Ubuntu(both local.properties and ANDROID_HOME was added), but build fail persisted. So workaround is to
add following lines
export ANDROID_HOME=/home/<user>/Android/Sdk
export PATH=$PATH:/home/<user>/Android/Sdk/tools
directly to the studio.sh script (inside /usr/local/android-studio/bin)
Maybe it will be helpful.
i encountered the same error but in my case i was cloning a project, the cloned project was built with Android API 22 which i did not install at the time(i had API 24 and 25 installed)........so i had to download the sdk tools for API 22
For Windows:
Add ANDROID_HOME to the Environment Variables:
ANDROID_HOME = C:/Users/YOUR_USERNAME/AppData/Local/Android/sdk
Add %ANDROID_HOME%\platform-tools to the PATH.
On my system (Ubuntu 20.04 after two version upgrades from 19.04) the symptoms were as if gradle (4.4.1 installed from APT repos) ignored ANDROID_HOME environment variable, while picking up the sdk.dir value from local.properties if I created one.
The reason appeared to have been that java command referred to openjdk version "11.0.7". After I installed openjdk-8-jdk package and did update-alternatives --config java to make the default java be version 8 ("1.8.0_252"), gradle started working as expected.
My issue was that directory did not exist. The env vars were set correctly, but the underlying directory did not exist. After opening AS the first time and having it create the directory, everything worked.
echo $ANDROID_HOME
/Users/x/Library/Android/sdk
$ echo $ANDROID_SDK_ROOT
/Users/x/Library/Android/sdk
$ cd $ANDROID_HOME
-bash: cd: /Users/x/Library/Android/sdk: No such file or directory

Error Running Android Project in Intellij IDEA

When I run my android project in Intellij IDEA using an AVD I get this error
android-apt-compiler: Cannot run program "/Users/myAccount/Documents/android-sdk-macosx/platform-tools/aapt": error=2, No such file or directory
Can anyone help? Thanks in advance!
Yeah according to Simon in
Android Hello-World compile error: Intellij cannot find aapt
"It appears that the latest update to the r22 SDK release moved aapt and the lib jar from the platform-tools to the build-tools directory. While we wait for JetBrains to release an update, here's a quick fix using a couple of symbolic links for Unix users:
From your AndroidSDK/platform-tools directory, run the following:
ln -s ../build-tools/17.0.0/aapt aapt
ln -s ../build-tools/17.0.0/lib lib
...and IntelliJ should be able to compile as normal.
"
Unfortunately copying is the easier way around this on windows...
unless you use something like
mklink /H C:\Users\Tom\androidsdk\build-tools\17.0.0\aapt.exe C:\Users\Tom\androidsdk\platform-tools\aapt.exe
in the command prompt to attempt to make a hard link window's style of the file to your platform tools folder.
caveat I haven't tried this though...
I solve this problem on WIn by copy all files from android-sdk/build-tools/17.0.0 to platform-tools folder.
i was successfully resolving on mac 10.8
copied only aapt and lib\dx.jar and dx
from build-tools/18.0.1
to
platform-tools
i copied only aapt.exe and lib\dx.jar
from build-tools\android-4.2.2
to
platform-tools

Javah missing after JDK install (Linux)

I'm trying to setup Android development with Eclipse (Indigo), on Fedora17.
Almost everything seems to work, just the javah is missing, to build the C headers with, for native (NDK / JNI) modules.
On my windows install of the tool chain it was in the same folder javac was in, but this is not the case on the Linux machine.
I previously installed Oracle's JDK1.7, found out that it's to new for something else I wanted to do (but also there, no javah), uninstalled it, now JDK1.6 is installed.
What might be wrong?
In linux machines, JavaH is normally located in /usr/bin/javah.
If you try to find this file with locate, it is normally a good idea to run before updatedb, since the database is not updated unless this command is run either by the user or a cron job. You could try finding the file with find / |grep javah
P.S. Sorry to post this as an asnwer. I suppose the corret way to go would have been a comment, but still don't have enough reputation to post a comment
This tool has been removed from the JDK
https://openjdk.java.net/jeps/313
Try gjavah rather than javah?
It turns out that javah link is not created during JDK install. You have to create it manually:
Check where is installed java:
$ ls -l `which java`
lrwxrwxrwx root root 26 15 juil. 02:05 /usr/bin/java -> /usr/java/default/bin/java
Create the symlink in the same directory:
$ su
# cd /usr/bin
# ln -s /usr/java/default/bin/javah

aapt not found under the right path

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 happen only at one project?
It seems that cleaning this specific project doesn't work but cleaning all open project does the trick.
I leave this question if someone else get this issue.
I found that this could be fixed by installing the ia32-libs package as the Android sdk requires 32-bit libraries.
I solved this problem by adding a / after my android-sdk path in...
Eclipse->preferences->android->SDK Location:
The aapt location has been changed recently. You can find it under:
/path/to/adt/sdk/buid-tools/android-[version]/aapt
In the terminal execute this command :
chmod a+x platform-tools/aapt
it solved the problem for me
(in 64bit you have to install ia32-libs with this command : sudo apt-get install ia32-libs)
Check you have Android SDK version required installed and the path in Eclipse->preferences->android->SDK Location is correct.
Check file permissions. Run:
chmod a+x aapt
If you are using Linux 64-bits. You'll see this hint:
Hint: On 64-bit systems, make sure the 32-bit libraries are installed: sudo apt-get install ia32-libs line 1 Android ADT Problem
To fix it, you'll have to install 32-bits libraries:
sudo apt-get install ia32-libs
or
sudo apt-get install lib32z1
Maybe you'll need to install other libraries (libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386) or the emulator (libsdl1.2debian:i386). In my case it was enough installing libstdc++6
sudo apt-get install lib32stdc++6
For more information you can check this question:
How to resolve Error executing aapt in Android/Eclipse?
Starting build-tool 23, aapt has been moved under the ./bin directory
waiting for Eclipse ADT to be updated , one can just create a symbolic link to aapt
cd <path_to_your_android_sdk_folder>/build-tools/23.0.0_rc1
ln -s ./bin/aapt aapt
this will create a symlinc
<path_to_your_android_sdk_folder>/build-tools/23.0.0_rc1/aapt
pointing to actual aapt tool laying here
<path_to_your_android_sdk_folder>/build-tools/23.0.0_rc1/bin/aapt
and eclipse will be able to build android project back again :-)
My issue with aapt got solved by simply chmod a+x platform-tools/aapt
Following did the trick for me. Had to do the build dep as some of the lib dependencies were missing.
sudo apt-get install lib32z1
sudo apt-get build-dep lib32z1
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
Restart eclipse
I didn't collide with this problem, but if you have ADT 8 revision or later, so you should read it's dependencies better: "ADT 8.0.0 is designed for use with SDK Tools r8. If you haven't already installed SDK Tools r8 into your SDK, use the Android SDK and AVD Manager to do so." (http://developer.android.com/sdk/eclipse-adt.html)
I've run into this problem constantly and can not get R to be resolved to a variable after making projects clean, in addition to not being able to find aapt -
Error executing aapt. Please check aapt is present at C:\AndroidSDK\android-sdk-windows\platform-tools\aapt.exe
None of the suggestions on this page make any sense or have helped in anyway. I'm using nothing but API 8 onwards.
I solved this problem by checking 'build automatically' under project menu.
I have faced the same problem after updating the SDK. I find out that the AUTOGENERATE folder doesn't have any file. What I done is :
WINDOWS->ANDROID SDK MANAGER:
rollback the SDK version to 16
Install all the tool provided.
SDK TOOLS (Version 16)
Platform Tools
install the SDK 4.0
Restart the eclipse
It solved!
For me, the problem was that Eclipse 4.4 was looking for aapt without "bin/" at the end of the path.
Since I could not find a way to configure this path, I symlinked the aap executable from the "bin" subdirectory to the "23.0.0_rc1" directory one level higher. This works now.

Categories

Resources