TitaniumStudio - Android SDK - android

I've tried every possible way I can think of and followed every forum list I can find, still to no avail. I'm trying to get the Android SDK to be recognized by TitaniumStudio. I installed in by going through the folders and running it that way, I've tried the command line option, I've installed it through Eclipse (which it works in) but TitaniumStudio STILL will not recognize it. I've reinstalled TitaniumStudio, that didn't work.
Key Points:
Everything is up to date
I'm working on Mac OSX 10.6.8
I know of Terminal and what it can do, but don't know Unix commands
The above is probably significant because somewhere in a forum someone mentioned changing the PATH for the sdk to read the /tools and /platform-tools folders using the /.bash_profile (I think that's what it's called, correct me if I'm wrong there) but when I tried to run the command via terminal to create an AVD (android create avd -n android_sdk -t 2 (android_sdk being the AVD name and 2 to point to the android-4 platform)), i get the following error:
-bash: android: command not found
Please help me with some insight into this "-bash" and what that is and how to fix this annoying problem! >.<
EDIT: I've gotten it to a point where I now get the following error when I try to send (android create avd -n android_sdk -t 2) through terminal:
Valid ABIs: no ABIs.
Error: This platform has more than one ABI. Please specify one using --abi.
What the heck does that mean and what's an ABI?? o.O

Run tools/android, It'll fire up a "Android SDK Manager" where you would see various platforms listed and the ABI's for those platforms underneath them. For example when I fire up my "Android SDK Manager", I see Android 4.0 (API 14) and then underneath it is "ARM EABI v7a System Image". Check this package and install it. Confirm that ABI's are indeed listed by running the command "android list targets".

Remember to start a new terminal when you are making changes to .bash_profile or .bashrc files. Failing to do so, would lead to errors like you are experiencing because the changes isn't loaded in, and the new PATHs and all the programs there isn't available to you.
With that being said, you need to add the folder with binary programs to your path, you can verify that the path is loaded in with the following command:
echo $PATH
Which gives me this on Snow Leopard:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Setting a path can be difficult in OSX because it seems like they have changed this behavior quite a bit between releases.
Look here for a more detailed answer about setting path variables: https://superuser.com/questions/69130/where-does-path-get-set-in-os-x-10-6-snow-leopard
There is also a description here on how to get Snow Leopard to read the user supplied .bashrc in the home-dir: http://kaspergrubbe.dk/2011/enable-bashrc-on-osx-snow-leopard-and-lion/

Related

'Visual Studio Emulator for Android' devices are not listed in the Android Device Monitor

I can start the VS Emulator devices just fine, but they simply don't show up in ADB/Android studio.
I searched and found a similar SO question (same issue, only I installed the standalone emulator) but OP provided a workaround and I would like to know how to actually fix it so it shows up every time as intended instead of having to connect it manually (and as per SO etiquette didn't want to ask there in the comments).
I also found a "solution" in a Microsoft FAQ post which instructs you to edit a registry key under
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools
but the 'Android SDK Tools' is nowhere to be found under 'Wow6432Node' in my registry, which could very well be the cause of the problem to begin with. I'm not sure if it's missing because of the Android Studio/SDK installation or something else, but for example Genymotion devices connect to ADB without any problems. (I always feel uneasy about adding anything to registry manually, but maybe I should add the 'PATH' myself?)
I installed everything just today on a fresh Windows 10 installation and didn't mess with anything in the registry myself.
Any help is appreciated. Thanks in advance!
I experienced this issue when i moved my android SDK (due to disc space reasons).
If you open regedit and go to the following registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools
and edit the value Path to look at your new android sdk location it should work.
you may have to call:
adb kill-server
adb start-server
and relaunch your emulator again to get adb devices to see it but it should show up in the end
You may also need to restart your machine just to be safe
In my case I didn't have that entry in registry. But all you need to do is just create the key Android SDK Tools that entry under
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
Then add the two keys as shown (right click -> New -> String Value). Add the correct path to your Android SDK. Here is what it should look like:
Once you add those entries
adb kill-server
adb start-server
Restart the Visual Studio Emulator for Android then run adb devices and hopefully it should just appear.
Copy Your ANDROID SDK PATH for me it look like this :
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools.
Note: if Android SDK Tools folder doesn't exist, Create it under WOW6432Node, And open it, And Create a String Value name it Path :)
Modify the Path registry variable to match the path to your Android SDK.
Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.
You can read this answers :
Nativescript project running with Visual Studio Emulator

Android SDK component failed to install

while installing Android studio SDK in ubuntu 14.04, 64 bit using the wizard; I encountered this error
The following SDK components were not installed: sys-img-x86-addon-google_apis-google-21 and tools
It occurred during "Downloading Google APIs Intel x86 Atom System Image, API 21, revision3"
Can someone please help me where the possible error is.
This solution helped me on Ubuntu 20.04 when I already installed the AS, but couldnt install packages in AVD Manager when I wanted to create a virtual device for the emulator, getting a very similar error. Maybe this will help in your case:
Delete the .downloadIntermediates/ directory from your SDK location /.../Android/Sdk/ (usually the path starts in your home folder).
From what I understood, this folder contains logs for your downloads,
and if something goes wrong, this can stop AS from
resuming/downloading new things properly. Don't worry about deleting,
this folder will recreate itself automatically and it doesnt affect
the program
How to delete it via the console:
Open your terminal, go to your sdk folder, if it's a default location in home folder the command is as follows:
cd Android/Sdk
Then check if the folder ".downloadIntermediates/" exists. Run this command and look for it in the list:
ls -la
If it's there, then proceed with removing it:
rm -r .downloadIntermediates
Now you can run the "ls -la" again to see if it is removed successfully.
Launch Android Studio again. Now try installing all the packages you need, they should install with no errors. Hope this helps in your case! :) And in any case, if nothing else works, an uninstall and clean install can be a good idea.

Unable to launch the android emulator from Eclipse 3.7.0 [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicates:
Not able to launch android emulator
Starting the Android emulator in SDK tools, revision 12
http://developer.android.com/sdk/eclipse-adt.html#installing I followed the instructions here for a windows 7 machine using a 64 bit operating system. It's a clean system install. I first installed the Android SDK and then installed Eclipse and then installed the ADT Plugin.
At first, simply nothing was happening. I'd click window-> android and it'd bring up the list of emulators I had made. I'd select one then click start and nothing. ADB.exe wasn't even in my systems resources. I made sure Kaspersky had added adb.exe to it's trusted list and tried again, still no dice.
I then saw an article saying I should move adb.exe from platform-tools to just tools so I tried that. That made it switch from doing nothing (and reporting nothing in the console or logcat) to where it is now. It says
invalid command-line parameter: Files.
Hint: use '#foo' to launch a virtual device named 'foo'.
please use -help for more information
Any more theories on what I can try would be greatly appreciated.
For further clarification the foo message happened with platform of 2.3.3. or 3.2 selected. When trying platform 3.0 it went back to nothing.
I had the same problem which was quite annoying me until I found a "fix" (well it does not solve the problem at its roots but helps a lot anyway):
Simple create a batch file with the following content:
CD "C:\Program Files\Android\android-sdk\platform-tools"
adb kill-server && adb start-server
Of course you have to adjust the correct android platform-tools path.
So whenever a running emulator is not recognized by Eclipse or DDMS simply run this batch.
I had this trouble when my SDK was installed in 'Program Files'.
The invalid command line parameter was the space in the program files part of the argument. I guess Android coming from a Linux world means that whitespace is it's enemy! Despite this being the default install location.
I moved the whole SDK (emulator included) to the root 'C:\' drive. It then started working a treat.
There is bug on the windows version.
Open a command line prompt in the /tools/ folder (which you can find in the sdk folder) then run the emulator-arm.exe -avd nameOfYourVirtualDeviceHere
(btw this will not fix the real issue but allows you to continue to work)

Starting the Android emulator in SDK tools, revision 12

I updated the Android SDK tools from revision 11 to revision 12, and the emulator now fails to start. When I try to run emulator.exe, I get:
invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
Hint: use '#foo' to launch a virtual device named 'foo'.
please use -help for more information
The path to emulator.exe is C:\Program Files\Android\android-sdk\tools.
How do I fix it?
As was previously suggested, it does seem to be caused by the fact that there is a space in the default installation path of the Android SDK: C:\Program Files\Android\android-sdk\
There are a couple of possible solves, though-
move installation directories to paths that do not contains spaces (as already mentioned)...
but simpler and possibly slightly less cumbersome is simply adjusting the path in Eclipse to use 8-dot-3 directory name(s). Since I'm running Win7, I have two Program Files directories, the second one being "Program Files (x86)" which is where the sdk installed. So the 8-dot-3 path is PROGRA~2. Thus, I simply changed the "SDK Location" value in the Android Preferences in Eclipse from C:\Program Files\Android\android-sdk\ to C:\PROGRA~2\Android\android-sdk\ and everything now works fine.
If you don't know the 8-dot-3 name of your desired path, just fire up a Command Prompt and execute "DIR /X"... the short name will be displayed next to each directory.
Same problem for me, though this is my first time trying to work with Android SDK in general. I believe the problem is with the location of the SDK. Note the "paramater" "Files\Android\android-sdk\tools/emulator-arm.exe." I believe there is a bug in google's code where it doesn't have the directory the SDK is located in in quotes, meaning, if there is a space anywhere in the directory name, it won't work. Can someone with their SDK in a directory with no spaces confirm my theory?
To work around the issue, you can call "C:\Program Files\Android\android-sdk\tools\emulator #foo" from the command line, where "foo" is the name of your emulator.
I got this problem just now, and I found a solution.
My path to the emulator-arm.exe is C:\Program Files\Android\android-sdk\tools. When I try emulator-arm #my_avd from the command line (my_avd is my Android Virtual Device name), it works.
I fixed this problem on Windows XP. Just cut from "C:\Program Files\Android\android-sdk" and paste content directory to "C:\Android\android-sdk". Set my system varaible 'ANDROID_HOME'="C:\Android\android-sdk". Set path to Android SDK in Eclipse as "C:\Android\android-sdk". That's it!
Everything works fine.
Since the cause of this issue is the space within filepath names of the Windows install directory then another workaround is to use the file short names (i.e. 8.3 alias filenames).
Specifically, if root install directory for Android SDK is
c:\Program Files\.. then use c:\PROGRA~1\..
or if
c:\Program Files(x86)\.. then use c:\PROGRA~2\..
You can then launch the SDK Manager via the command-line by running:
start c:\PROGRA~2\Android\android-sdk\tools\android.bat
Fixed in r13. Update your SDK Tools!
I think you are saying you changed the minSDK version of your app and now the emulator wont run...? this is because your emulator is the wrong version... assuming you changed the minSDK of your app correctly, all you need to do is create a emulator with the same SDK version. Open the Android SDK / AVD manager (icon top right of screen next to print token) and create a emulator with minSDK 12.
Moving your Android SDK folder to somewhere that the complete path will be without white spaces will fix the problem.
I also got this problem after updating SDK Tools from revision 11 to 12.
I found it was a problem with a space in the upper directory name where android-sdk-windows resides, then I copied both 'eclipse' and 'android-sdk-windows' directories from my 'Program Files (x86)' to the root of drive D:.
All is solved now!
As an alternative to PROGRA~2 method (which is not working for example in Intellij IDEA), you can create a symlink named, for example, prg to Program Files (run mklink /? from command line to learn how to do it), then run emulator as C:\prg\Android\android-sdk\tools\emulator.exe. Change path to SDK/emulator in your IDE also.
I had a same problem when I setup r12. I found out this problem was caused by blank spaces in the path you setup android SDK. The solution is that you should move the folder of android SDK to a place without spaces, in your case : E:\andriod-sdk or D:\abc\xyz\android-sdk.

Issue creating AVD on command prompt in windows XP

I am the beginner for android development. I followed the procedure as specified in developer.google.com . for installing I Tried to create AVD(Android virtual device) through command path. I executed at command prompt.
android create avd --target 2 --name my_avd
But the Error is coming "Error: Target id is not valid. Use 'android.bat list targets' to get the target ids."
After executing android.bat list targets is showing blank. I am not able to figure out the problem as I have already set the path also.
THe problem is resolved. windows by default is not loading api for android virtual device. we need to manually start the downloading of those. follow this procedure:
go to android List item sdk folder which u have extracted. to the tools folder
un android batch file a api would be loaded. Here go to settings and mark "Force https to fetch from http".
Then go to availabe packages and amrk the link provided and install it.
after following this procedure all the above specified errors would be resolved.
I think you use "android create avd -n xxx -t 2" to create AVD, and use "android.bat list targets" to find the creation result.
You should use "android list avds" to list AVD. Targets is different from virtual devices.
You may have no targets installed. Check available packages in sdk manager and install some.
As per dtmilano, install some packages [images of the different Android OS versions]. This is an easy step to miss.
FYI: here are the end-to-end steps for installing an app on the emulator using the cmd line tools on MacOS (I assume win64 is equivalent):
http://richardboardman.com/2011/07/100-days-of-tech-day-1-android-dev-tools/

Categories

Resources