I just installed the latest galileo eclipse release. I added the
latest adt plugin and configured it to use my android sdk (r4).
Unfortunately, the eclipse plugin is wiggin out. for some reason, it
can't find(execute?) the android tools. I get this error on the
eclipse project:
Error executing aapt. Please check aapt is present at
~/android-sdk-linux_86/platforms/android-1.6/tools/aapt
but here is the output of ls:
ls -al ~/android-sdk-linux_86/platforms/android-1.6/tools/aapt
-rwxrwxrwx 1 solid solid 3416259 2009-12-18 21:02 /home/solid/android-sdk-linux_86/platforms/android-1.6/tools/aapt
When I try running the program directly, I see the following:
~/android-sdk-linux_86/platforms/android-1.6/tools/aapt
bash: /home/solid/android-sdk-linux_86/platforms/android-1.6/tools/aapt: No such file or directory
I just unzipped the sdk and installed the platforms and ls'd it so I know it is there.
I have tried recreating the project from the command line (which
works) but when I import it into eclipse I get the same error.
BTW this is linux amd 64
Something is very wrong here. These two lines contradict themselves:
$ ls -al ~/android-sdk-linux_86/platforms/android-1.6/tools/aapt
-rwxrwxrwx 1 solid solid 3416259 2009-12-18 21:02 /home/solid/android-sdk-linux_86/platforms/android-1.6/tools/aapt
$ ~/android-sdk-linux_86/platforms/android-1.6/tools/aapt
bash: /home/solid/android-sdk-linux_86/platforms/android-1.6/tools/aapt: No such file or directory
The file just can't exist one instant, then cease to exist in the next.
I don't think this is caused by running on amd64, since I'd suspect that would give you a different, more descriptive error. That being said, make sure you have the ia32-libs installed:
# Assuming you're on Ubuntu
$ apt-get install ia32-libs
My only advice would be to try completely deleting your SDK installation and re-installing it from scratch.
Related
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 have installed android SDK and android eclipse plugin successfully on Ubuntu.
Every thing was working fine until I removed Ubuntu and installed Linux Mint.
I installed the SDK again and used the same eclipse copy I was using on Ubuntu but now all the android applications contain errors and I can not start the emulator.
When starting the emulator this message appears
Starting emulator for AVD 'test' Failed to start emulator: Cannot run program "/home/anas/android//tools/emulator": error=2, No such file or directory
While the android SDK is installed in the specified path and the file (emulator) is exists in the same path.
Also all my applications contains the same error R can not be resolved to a variable
What is the problem here?
Installed on Ubuntu successfully.
but not running avd
If you're running a 64-bit system, you need to install ia32-libs
sudo apt-get install ia32-libs
R can not be resolved to a variable
This can be due to following Reason
class is not the part of that package add proper package
not properly defined in manifest file class path define it properly
clear and run the avd it will work
If cmd from fist comment doesn't work like in my case (64bit Crunchbang) then you may also try with :
sudo aptitude install ia32-libs lib32ncurses5 lib32stdc++6
I solved it doing a backup of the "emulator" and creating a symbolic link to the correct emulator:
mv emulator emulator_bup
ln -s emulator64-arm emulator
I used the command-line tool android (android avd), and used Tools->Manage SDK to install 64 bit emulators. I then mv'ed emulator to emulator.old, and emulator64-arm to emulator. Now the AVD starts up.
You do not need install packages any more!
In directory tools, there are many types of emulator, while my computer works with emulator64-arm! My system is Linux Mint 16 amd64! Good luck!
./emulator64-arm #yxphone -sdcard yxsd -scale 0.8
Like you have written the specified path and the files are exists in the same path, but i suggest to check that one more time.
and like you are getting R cannot be resolved to a variable, do not worry:
Reasons:
Check Package name in Manifest File
If you are already getting something like this: import com.version.bajrang.january.R;
so first of all try to change package name here, or secondly just delete this line and
clean your program
If you are not getting something like: import com.version.bajrang.january.R;
then add import packagename.R;
I believe that you will get your answer.....
It looks like your SDK path in eclipse has a mistake:
Cannot run program "/home/anas/android//tools/emulator"
That double "//" may be the problem. Check in Eclipse: Window -> Preferences -> Android. There should be a field there pointing the SDK Location. Edit it.
Check your path : /home/anas/android/ to see if it really is where you put your SDK . If not repeat these steps to have it
The missing R resource message is a compile error right? Then in this case your emulator should not be the problem. However, if your SDK path is incorrect like I suspect, then .. you can expect this compile error along with any other android libraries import
This is sorted by running this on Ubuntu.
sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb
Refer this: Can't connect to emulator through ADB genymotion
I use Ubuntu 11.10 and eclipse for Android development. I used to keep the android-sdk in my home folder, but because of low space, I copied it to the hard disk. When I moved the sdk to the hard disk, I did not have permissions to run adb, aapt or other platform tools. So, I edited the /etc/fstab file and added the following line
/dev/sda3 /media/hdisk ntfs-3g defaults 0 0
Now, when I execute the command ls -l | grep "sdk" in the terminal, i get this output
drwxrwxrwx 1 root root 4096 2012-10-20 16:07 android-sdk-linux
So, I have the permissions now, but when I run eclipse, the R.java file is still not generated, but the BuildConfig.java file is generated. I can run aapt from the terminal, but doing it every time I change the code is not practical. Any suggestions?
In case you have a 64bit Linux running, this command may help you:
sudo apt-get install ia32-libs
Had the same issue and that one did the trick. Found here.
Its a very basic check but have you changed the location of the Android SDK within Eclipse?
Preferences -> Android -> SDK Location
This problem seems have to solved itself after restarting my PC about 2-3 times. Thanks for all the help everybody.
My generation of R.java is non-existent, but my BuildConfig.java is still generated when projects are rebuilt. This problem is not localized to a single project in my workspace, but to the entire workspace which has projects in ranging from gingerbread to jb, all of which exhibit this error. I have been working with the Android platform for over a year now, and the R.java generation has always been a little mystical, but would always seem to fix itself with a restart of eclipse or a rebuild of the project.
This started when I ran a java update to java 7, so did a changed back to the java 6 sdk, specifically 1.6.0_26, did a fresh install of eclipse(4.2), the android sdk and adt, but to no effect.
I am working on this project with other group members(working off of the same master git repo), and they are not having problems with R.java generating, so therefore I can say for certainty that there are no errors in files causing the R.java to not generate.
And as a disclaimer, yes I have read the plethora of material on here with R.java related issues.
Any suggestions? Thanks
I had the exact same symptoms.
Problem
R.java not getting build across the workspace, resulting in an error when trying to import it: The import <tld>.<project>.R cannot be resolved
The error reporting that the version of adb could not be determined despite existing:
Failed to get the adb version: Cannot run program "/home/dtk/.opt/android-sdk-linux/platform-tools/adb": java.io.IOException: error=2, No such file or directory from '/home/dtk/.opt/android-sdk-linux/platform-tools/adb' - exists=true`
dtk#humbee ~/.opt/android-sdk-linux/platform-tools % ll | grep adb
-rwxr-xr-x 1 dtk dtk 200K Sep 12 14:41 adb*
dtk#humbee ~/.opt/android-sdk-linux/platform-tools % file adb
adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
dtk#humbee ~/.opt/android-sdk-linux/platform-tools % ./adb
zsh: no such file or directory: ./adb
127 dtk#humbee ~/.opt/android-sdk-linux/platform-tools %
Solution
Installing ia32-libs fixed it for me:
root#humbee:~# uname -m
x86_64
root#humbee:~# aptitude search ia32-libs
p ia32-libs - ia32 shared libraries for use on amd64 and ia64 systems
p ia32-libs-dev - ia32 development files for use on amd64 and ia64 systems
p ia32-libs-gtk - GTK+ ia32 shared libraries
v ia32-libs-static -
root#humbee:~# aptitude install ia32-libs
The following NEW packages will be installed:
ia32-libs lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32tinfo5{a} lib32v4l-0 lib32z1 libc6-i386{a}
[...]
dtk#humbee ~/.opt/android-sdk-linux/platform-tools % ./adb version
Android Debug Bridge version 1.0.29
dtk#humbee ~/.opt/android-sdk-linux/platform-tools %
HTH,
dtk
If you are using Eclipse, I would recommend to turn-on extended logging, it should display AAPT output, when AAPT is a tool for generating R.java.
To make this - go to Window->Preference->Android->Build and set BuildOutput to Verbose.
When you are done - make a clean build and pay a highest attention on COnsoleOutput tab in Eclipse. Every warning or message can guide you to the error.
Let us know if you'll notice something interesting.
Good luck
I encountered this with the latest update. Deleting then re-importing the project to my workspace fixed it.
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.