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
Related
You have the M preview channel build tools installed (at time of writing, rev 23rc1) and you get an error something like this:
Error:android-apt-compiler:
Cannot run program ".../sdk/build-tools/23.0.0_rc1/aapt": error=2, No such file or directory
The build-tools binaries have moved (again)! You find them now under the bin directory.
$ ls build-tools/23.0.0_rc1/bin/
aapt arm-linux-androideabi-ld dexdump llvm-rs-cc split-select
aidl bcc_compat i686-linux-android-ld mipsel-linux-android-ld zipalign
So as a temporary fix, symlink them.
cd $ANDROID_HOME/build-tools/23.0.0_rc1/
ln -s bin/* ./
As you say the build-tools binaries have moved. So, a temporary fix is open the SDK Manager and remove the Tools of Preview Channel 23rc1 and make the 22.x version as default. Later Rebuild your project and done.
I hope this is useful.
I making a small game in python with pygame.
I wanted to make the game available for android.
Hopefully, there was PGS4A for this
After doing the configuration I had to build it.
So I just typed the command:
python android.py build ~/project/programming/python/gameEngine release install
And I ended up with this error:
BUILD FAILED
/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/tools/ant/build.xml:570: The following error occurred while executing this line:
/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/tools/ant/build.xml:622: The following error occurred while executing this line:
/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/tools/ant/build.xml:658: Execute failed: java.io.IOException: Cannot run program "/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/platform-tools/aapt" (in directory "/home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/extras/google/play_licensing/library"): error=2, No such file or directory
What do I do with this. I'm lost.
I'm using crunch bang linux 11.
You're probably using a 64-bit OS, while the binaries are compiled against 32-bit libraries.
I'm not familiar with CrunchBang's repositories, but you can probably try
sudo apt-get install libc6:i386 libstdc++6:i386 zlib1g:i386 lib32ncurses5
and then run the installer again.
For some reason, this is a common problem that usually occurs on Windows with pgs4a 0.9.6.
Take a look at this.
To make sure that the directory structure of the unzipped file is the same as the screenshot.
You do not have a full android-sdk installed. You need the missing files that the error refers to. You can either roll-back to pgs4a 0.9.4, which doesn't use those licensing files or reinstall android-sdk
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6$ cd android-sdk/
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk$ ls
add-ons extras platforms platform-tools SDK Readme.txt temp tools
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk$ cd extras/
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras$ ls
google
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras$ cd google/
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google$ ls
play_apk_expansion play_licensing
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google$ cd play_licensing/
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google/play_licensing$ ls
library LICENSE.txt README.txt sample source.properties test
craig#ubuntu-desktop:~/Documents/python/pgs4a-0.9.6/android-sdk/extras/google/play_licensing$
This link may help.
http://discussion.pychildren.org/t/windows-installation/10
To fix it go to this site http://ady.my/viewer/ and, in the section build, download the most recent version of build-tools. Extract the files 'aapt' and 'dx' and the directory 'lib' and move these all for the especified folder on the terminal /home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/platform-tools.
The code will be similar with this below:
mv aapt dx lib /home/turquoisepotato/project/programming/python/pgs4a-0.9.6/android-sdk/platform-tools
But the PGS4A is obselete. I suggest for you, use the Python for Android, that you find in this link: http://python-for-android.readthedocs.org/en/latest/
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.
I'm running Jenkins on Mac OS. I have an ant build file that tries to execute <exec executable="android"> in one of the targets. I have the correct path as I've included android sdk tools and platform-tools folders to it, but I am still getting the following error.
android can't find sdkmanager.jar
If I move described jar from lib folder to tools folder I'm getting some other similar error related to another jar, so it seems it just can't get this jar from lib folder. Please help.
I solved my problem. I had correct path and sdk installation directory. Problem was that my Jenkins was running under another user and couldn't locate directory with android lib because they where denied for it. So problem was in sdk folder permissions.
I've just ran chmod -R 0755 mySdkDirLocation from console under bash and became the happiest developer on earth for the moment:)
After I ran chmod -R 0755 mySdkDirLocation. The error "android can't find sdkmanager.jar" went away. But when I ran android update sdk -u, I cannot install archives. So I ran chmod 777 mySdkDirLocation. Then the downloading worked.
I need to do somethings that must be done from the command prompt of the android tool.
but every one says it's in the platform tools folder in the sdk path but which file is it?
that might help:
the contents of platform tools folder:
aapt.exe
adb.exe
aidl.exe
dexdump.exe
dx.bat
fastboot.exe
llvm-rs-cc.exe
source.properties
AdbWinApi.dll
AdbWinUsbApi.dll
Did you mean android Adb command lin tool if so see this link
if you want to manage emulator from command line see these three link it will help you a lot
Android Emulator
Using the Android Emulator
Android Emulator on Linux
There is an android command, but it's not an executable - run the android.bat in the tools directory, and you should be able to make the changes you need. If you add the tools directory to your system path, you'll be able to run android from any directory when using the command line.