So on my previous laptop I've installed the android-sdk-linux and Eclipse separately without the adt-bundle, without any issues whatsoever. Also, I installed it under my home directory.
Now that I have a new laptop (clean slate) to start with, I wanted to try and install the adt-bundle into the correct/conventional directory (which I understand is /usr/local/).
But after extracting the bundle into /usr/local/ I get weird issues like adb not being an executable, etc. Opening Eclipse yields a lot of errors regarding the SDK, ADT, and adb.
What is the correct method of doing this? A step-by-step or otherwise comprehensive set of methods would be greatly appreciated.
Also, is there any reason why I should consider installing android-sdk-linux and Eclipse separately instead of using the adt-bundle?
Thanks in advance :). This will help me learn more about Linux filesystems and administrations a little bit too!
It seems that the problem is in Linux filesystem permissions of your folder. In case of home directory the owner of the files is your user, in case of /usr/local/ the owner is root. You should try to change the owner of the folder:
chown -R <owner_name>:<owner_group> <your_dir>
As for reasons to install sdk and Eclipse separately, I don't think that you'll find critical one. Using bundle it's easier to install everything to work with Android (I think that Eclipse in this case is already configured, however I do not know precisely because I've never used this approach).
Related
I think the answer is No but I’m not 100% sure as I’m a newbie with Android SDK.
So, I downloaded adt-bundle-linux-x86-20140702 to my CentOS 6.5 machine. Following the documentation, I was able to create an AVD using ‘AVD Manager’ interface (using the eclipse binary).
I’m able to view my AVD that I created by running emulator -avd <name>.
I have a .apk file which I didn’t build but downloaded from a website (I don’t have the source code). If I would like to load this .apk into my emulator to see how it works, is it something that’s doable? If yes, may I know the steps please?
Many thanks in advance.
Update:
Following this link, I tried:
adb install /path/to/my.apk
which returns,
“failed to copy ‘/path/to/my.apk’ to ‘/data/local/tmp/my.apk’: No such file or directory”
I also tried copying /path/to/my.apk to the directory where adb is located. I created a /data/local/tmp directory as well with the same result. Perhaps, it’s looking for /data/local/tmp on the AVD (?). Not even sure if it is a compatible issue with the device/target/cpu configured on my AVD ..
Appreciate any help.
So I downloaded the adt bundle for linux from developer.android.com extracted it, 32bit version, went to adt-bundle-linux-x86/eclipse tried to launch eclipse but it's giving me an error
Could not display "/media/ACF3-BA90/adt-bundle-linux-x86/eclipse/eclipse".
There is no application installed for executable files. Do you want to search... blabla..
I'm pretty much new to linux and ubuntu... so can someone please help me fix this? :P
EDIT: The problem was caused because I had it extracted on removable media and Allow executing file as program (Properties -> Permissions) still didn't fix the problem, so I had to transfer it to my (static) Linux partition. That fixed the problem.
I came across the same problem these days when i attempted to write cocos2d-x games with adt-bundle-linux. Now I finally fix that after googling around for hours.
It turns out that this has nothing to do with adt-bundle-linux. The truth is that linux security settings result in such situations. It disables any executable file from other sources (in this case, it comes from the Internet and linux regards it as dangerous and unreliable files).
Simply right click the eclipse and choose "properties", then go to the "Permission" tab and check "Allow executing file as program".
Hope this will help you.^_^
It seems you have installed to some sort of removable media and therefore your install could have bad references for eclipse's files.
I would recommend you install Eclipse from Ubuntu's Software Manager and install the SDK from Eclipse's Plugin Manager.
Here's the tutorial for the SDK:
http://developer.android.com/sdk/installing/installing-adt.html
Cheers!
"Error executing aapt. Please check aapt is present at ... /platform tools/aapt"
I am trying to build Android apps using Eclipse Android SDK in Ubuntu.
I installed Ubuntu 32bit 10.10 in two different computers and I can't fix the problems now.
I installed Eclipse, ADT plugin, Android SDK, all Android APIs, ...and also I have set Preferences to Android SDK folder. I also carefully put all SDK and Eclipse in my username folder to make sure I fully have right permission.
I also try to use google to find similar cases. Most cases use 64 bit Ubuntu.
I also fix the GNU compiler and some instructions here.
But now I am really hopeless. It looks like this problem is really serious.
I really appreciate all of your helps.
Thanks so much
ddienle#gmail.com
ledangdien#yahoo.com
Thanks again
*Also, I try to restart my Computer many times and try to install many different version
of Eclipse. Each time I set Preferences for Android SDK, the following message box occur
"Failed to get the adb version: Cannot run program "/home/sdc/android-sdk-linux_x86/platform-tools/adb": java.io.IOException: error=13, Permission denied"
Now I try everything but they don't work*
Have you tried the adt-eclipse-bundle?
https://developer.android.com/sdk/installing/bundle.html
You have some wrong permissions. Perhaps some files are owned by the root user because of using sudo when it wasn't needed. All files in your home directory should be owned by your user. You can fix that with the following:
sudo chown -Rc $USER:$USER /home/sdc/
I installed JavaEE, JDK, Eclipse 3.5.x (Galileo), the Android Starter SDK, and the current ADT all with no problems. However, when I try to walk through the 'Hello Android' tutorial, I bring up the New Android Project wizard, fill it in and hit 'Finish'.
After a moment, it comes back with a message saying there was a problem at path X:\so and so\ (access denied).
Things to note:
-Running Windows 7 Home Premium 64-bit
-Quadcore Pentium with 8GB RAM, 8TB NAS
-I am an Administrator
-I have also tried this by activating the full (hidden) Administrator profile
-I have reinstalled everything 8 or 9 times
-I have changed ownership & permissions all over the place
-I have launched eclipse in 'Run as Administrator' Mode
-I have installed Everything as 32-bit, as others have done this successfully
Eclipse creates the folder it's having a problem with, but then cannot work with the .project file it creates (access denied). It then can't save anything so there is nothing but an empty folder 'Hello_Android' on the left within Eclipse.
Anybody have any clues about what is going on-- I'm frustrated. I want to get into this, and I've looked EVERYWHERE on the net trying to crack this nut.... but I need help.
-J
Hmmm. Interesting.
I would double-check permissions on the folder X:\so and so\ and ensure that the Administrators group and/or your account has full control.
Have you tried creating the project outside of the users or systems environment? You know in c:\myprojects
Windows7 and creating/saving files in program files or documents can be a PITA.
Turned out to be a bug with how eclipse is written. I've developed a workaround.
The problem is that eclipse can't write to hidden files, unhide them and it should work.
New to android. Running Eclipse on Ubuntu 9.10 with Android SDK plugin installed and working. Trying to get some code samples from http://developer.android.com/resources/samples/get.html , and following its procedure to load said samples in Eclipse yields:
Parent of resource: /home/user/android-sdk/platforms/android-4/samples/Notepad/.project is marked as read-only.
chmod is not recursive, so I entered ~/android-sdk/platforms and "chmod 777 *" ie. all folders in /platforms. Still doesnt work. Appears to be be a bug in Eclipse that wants to create the project in the SDK folder rather than under ~/workspace.
This is an old thread, but still an issue with the newest release of ADT.
To get around the issue and avoiding having to chmod the entire sdk platform, you can just change ownership of the project itself to your profile instead of the default root profile it is set to.
if you issue:
sudo chmod -R yourProfileName YourProjectDir/
Where yourProfileName is your user profile name, it should resolve the issue. If you are unsure what your profile name is, it is usually the name of your home directory in OSX. In windows, you should be able to find it somewhere under control panel -> profiles.
The far better solution is to select a choice such as "copy into workspace" when creating/importing the Eclipse project.
This has the benefit of leaving the original source files in a clean state, where you can easily refer back to them if your modifications to an example break it.
Whoops. Chmod does have a recursive functionality (of course):
chmod 777 android-sdk -R
but that seems to have borked the Eclipse workspace.