i cant get Android sdk or avd to work
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 18
- Joined: Mon Aug 06, 2012 10:22 pm
i cant get Android sdk or avd to work
Iv installed livecode 5.5.1, Java jdk (2.1 i belive) and Android sdk. When i try to open Android sdk or avd to configure it all i get is a little black window that pops up then it closes on me right away. Iv uninstalled an reinstalled both multiple times but get same result. Am i doing something wrong? when its done installing it asks if i want to run it but when i do nothing happens so i try to open from icon but thats where i get the black screen. Any ideas?
Re: i cant get Android sdk or avd to work
2 things to try. If you try to run it from a command prompt directly you should be able to see any errors that occur when its running. You also might try to run it with administrator permissions. (right click the icon, run as administrator)
Of course if you're on the mac, same thing applies. Try to run it directly in the terminal and see what error it throws.
Of course if you're on the mac, same thing applies. Try to run it directly in the terminal and see what error it throws.
-
- Posts: 18
- Joined: Mon Aug 06, 2012 10:22 pm
Re: i cant get Android sdk or avd to work
Sturgis
I tried what you suggested with no luck. I am a administrator on my comp but tried to select my name anyhow, still black window that appears then closes. I also tried running it from the run option but same thing and it didnt give me any details as to why. Am i using versions that dont work together somehow? Does the sdk and avd have to be.saved in a certian place? Iv looked for answers elsewhere also but have yet to find anyone with these seemily simple issues. Iv no idea whats causing it, ugh. Im on PC by the way if it makes a difference. Thanks for your input nonetheless
I tried what you suggested with no luck. I am a administrator on my comp but tried to select my name anyhow, still black window that appears then closes. I also tried running it from the run option but same thing and it didnt give me any details as to why. Am i using versions that dont work together somehow? Does the sdk and avd have to be.saved in a certian place? Iv looked for answers elsewhere also but have yet to find anyone with these seemily simple issues. Iv no idea whats causing it, ugh. Im on PC by the way if it makes a difference. Thanks for your input nonetheless
Re: i cant get Android sdk or avd to work
Try this..
Make a stack. Put 1 button on it, and 1 field. Stretch the field out so it takes up most of the card.
Put this code into the button script
Click the button, browse to the sdk manager (or avd manager) and click ok. Any errors should pop into the field.
If there are no errors the program should show up (and if its the sdk manager it will give you options to update)
This is easier than starting a prompt and getting to the right spot to run the program. This way you just pick the program, it is executed and any output is captured for debugging purposes.
Make a stack. Put 1 button on it, and 1 field. Stretch the field out so it takes up most of the card.
Put this code into the button script
Code: Select all
on mouseUp
answer file "Pick the file to run" --choose the sdk manager or avd manager to run
if it is not empty then --make sure a file was actually chosen
put shortfilepath(it) into tPath --if so use the shortfilepath function to get rid of the spaces in the path
put "Executing: " && tPath & cr after field 1-- show a message with the path to be executed.
--Do the actual execution
-- if it works, no error message should be displayed, but a blank line will be added to the field
-- if it fails and there is an error, the error should be displayed in the field.
put shell(tPath) & cr after field 1
end if
end mouseUp
If there are no errors the program should show up (and if its the sdk manager it will give you options to update)
This is easier than starting a prompt and getting to the right spot to run the program. This way you just pick the program, it is executed and any output is captured for debugging purposes.
-
- Posts: 18
- Joined: Mon Aug 06, 2012 10:22 pm
Re: i cant get Android sdk or avd to work
sturgis
executing: C:PROGRA~1/Android/ANDROI~1/SDKMAN~1.EXE
thats what i got when i picked sdk icon to load
executing: C:/Android/ANDROI~1/AVDMAN~1.EXE
thats with avd selected to load
does that mean its working? if so how do i get into it to be able to configure it for devices and whatnot, or do i need even need to?
executing: C:PROGRA~1/Android/ANDROI~1/SDKMAN~1.EXE
thats what i got when i picked sdk icon to load
executing: C:/Android/ANDROI~1/AVDMAN~1.EXE
thats with avd selected to load
does that mean its working? if so how do i get into it to be able to configure it for devices and whatnot, or do i need even need to?
Re: i cant get Android sdk or avd to work
So, no error message, but no window pops up?
When you execute the sdk manager it should pop up a window where you can select what updates and such that you want (make sure you have. 2.2 installed at the very least, I install everything from 2.2 up to.. well the current which is 4.1)
If no window pops up but no error shows it sounds like its running but maybe you can't see the window? Do you have dual monitors?
If after starting the sdk manager you press the alt key and hold it, then hit tab once (keep the alt key down after releasing the tab key) in the list of programs does it show the sdk manager? You can press tab to cycle through them while holding down the alt key so that you can see the label on each (and select whatever)
Does the sdk manager show in your task bar?
If you it appears that the programs are running as you expect, but you just can't see the windows (and can't bring them up from the task bar or alt-tabbing to them) have you had more than 1 monitor connected? If so, have you changed how your monitors are set up recently? Can you plug plug in a second, or if you have 2 running can you turn one off and see if windows will moe things around for you bringing the windows back into view?
Have you tried restarting? Sometimes a restart is a magic bullet. It helps to cross your fingers (the programmers prayer) while whistling dixie while covering one eye... (ok so it couldn't hurt!)
Hmmm just had a final thought. When you start the sdk manager (and/or avd manager) the black window pops up and starts a new process. But if your machine is slow, or has a slow drive (like a laptop) it can take a bit for things to start up. So after a restart (to make sure things are clean and fresh) try it again, wait for the black window to go away and then go grab a soda. See if its up by the time you get back. (my laptop isn't all that slow but it takes just long enough to load some things that its right on the -- did it crash?-- threshold of impatience.)
When you execute the sdk manager it should pop up a window where you can select what updates and such that you want (make sure you have. 2.2 installed at the very least, I install everything from 2.2 up to.. well the current which is 4.1)
If no window pops up but no error shows it sounds like its running but maybe you can't see the window? Do you have dual monitors?
If after starting the sdk manager you press the alt key and hold it, then hit tab once (keep the alt key down after releasing the tab key) in the list of programs does it show the sdk manager? You can press tab to cycle through them while holding down the alt key so that you can see the label on each (and select whatever)
Does the sdk manager show in your task bar?
If you it appears that the programs are running as you expect, but you just can't see the windows (and can't bring them up from the task bar or alt-tabbing to them) have you had more than 1 monitor connected? If so, have you changed how your monitors are set up recently? Can you plug plug in a second, or if you have 2 running can you turn one off and see if windows will moe things around for you bringing the windows back into view?
Have you tried restarting? Sometimes a restart is a magic bullet. It helps to cross your fingers (the programmers prayer) while whistling dixie while covering one eye... (ok so it couldn't hurt!)
Hmmm just had a final thought. When you start the sdk manager (and/or avd manager) the black window pops up and starts a new process. But if your machine is slow, or has a slow drive (like a laptop) it can take a bit for things to start up. So after a restart (to make sure things are clean and fresh) try it again, wait for the black window to go away and then go grab a soda. See if its up by the time you get back. (my laptop isn't all that slow but it takes just long enough to load some things that its right on the -- did it crash?-- threshold of impatience.)
Last edited by sturgis on Tue Aug 07, 2012 4:32 pm, edited 1 time in total.
-
- Posts: 18
- Joined: Mon Aug 06, 2012 10:22 pm
Re: i cant get Android sdk or avd to work
Those are some good ideas, i will go try them and get back to you. Thanks for the help, heres to hoping. An yes, i am trying to run on a laptop, i do not have dual monitors though. Im not sure if i have 2.2 either, i don't recall seeing info on which 1 i have. Ok, time to go test out the ideas.....
-
- Posts: 18
- Joined: Mon Aug 06, 2012 10:22 pm
Re: i cant get Android sdk or avd to work
After uninstalling an reinstalling Java and Android sdk i still get same results, black command prompt window that pops up then closes. I tried the alt +tab thing an nothing happened. Im using both links from the how to instal lesson page so id think id have what i need.. Starting to frustrate me a lil bit, an iv looked through these forums but i seem to be the only one with this issue, (lucky me). I noticed it said something about 2.2 but i read i have to be able to open sdk to install it, if i dont already have it of course but i dont know how to check. Im letting my laptop sit to see if it loads eventually, didnt work last time but dosent hurt to try again. I also noticed from the lesson screen shot their sdk destination had the word "windows" at tje end of it, when mine comes up to pick destination i have everything but the windows word. Does that even matter? Im up to about 7 hours of trying to figure this out....dedication huh
-
- Posts: 18
- Joined: Mon Aug 06, 2012 10:22 pm
Re: i cant get Android sdk or avd to work
so i finally got it to show me a error message. after going to C:\programfiles\android\android-sdk\tools\lib then clicking on sdk icon in the folder it shows up in cmd screen "failed to execute tools\android.bat" "the system cannot find file specified". i noticed theres no .bat that i can see anywhere in the folders and theres a document saying it moved and to get it i have to open sdk manager an install it or whatever. kinda pointless if i cant get it to open to install it id think. So once again..im stuck
Re: i cant get Android sdk or avd to work
I'm not sure what to tell you at this point. If you are running the sdk manager (c:\program files (x86)\Android\android-sdk\sdk manager.exe) it should
a) pop up that black window for a sec..
b) pop up a new window named android sdk manager
at which point you can choose things to install, do updates etc
From the sdk manager you can start the avd manager. (tools menu, choose "manage avds")
at which point a new window pops up where you can define new test devices etc, and then run them so they are available to livecode.
(you also have to set the livecode preferences to point at the right location so that it can find the sdk)
Since you get no error when running the sdk manager, but no window pops up, i'm stumped.
a) pop up that black window for a sec..
b) pop up a new window named android sdk manager
at which point you can choose things to install, do updates etc
From the sdk manager you can start the avd manager. (tools menu, choose "manage avds")
at which point a new window pops up where you can define new test devices etc, and then run them so they are available to livecode.
(you also have to set the livecode preferences to point at the right location so that it can find the sdk)
Since you get no error when running the sdk manager, but no window pops up, i'm stumped.
-
- Posts: 18
- Joined: Mon Aug 06, 2012 10:22 pm
Re: i cant get Android sdk or avd to work
im trying Java 6 now because i heard it works instead of 7. Also read that the path for Java could be wrong so i might have to figure out how to change that (sermed to help a few people). Also, i read that i should try Android sdk zip file instead of .exe. Might try that also if the one the lesson suggests dosent work. After that i might have to call it quits for now. Thanks for all the help though
Re: i cant get Android sdk or avd to work
Just checked my (working) Windows setup at home:
Location of Android development SDK root:
C:/Program Files/Android/android-sdk
JDK Path: C:\Program Files\Java\jdk1.7.0_01
Try going to C:\Program Files\Android\android-sdk\tools and running android.bat.
That should bring up the Android SDK manager.
If that doesn't work then the sdk isn't installed properly.
If it does work then see what's installed. At the very least you should have both items under Tools checked and at least one SDK Platform.
Location of Android development SDK root:
C:/Program Files/Android/android-sdk
JDK Path: C:\Program Files\Java\jdk1.7.0_01
Try going to C:\Program Files\Android\android-sdk\tools and running android.bat.
That should bring up the Android SDK manager.
If that doesn't work then the sdk isn't installed properly.
If it does work then see what's installed. At the very least you should have both items under Tools checked and at least one SDK Platform.
-
- Posts: 18
- Joined: Mon Aug 06, 2012 10:22 pm
Re: i cant get Android sdk or avd to work
Mwieder
I didnt seem to ever have Android.bat anywhere any time i downloaded the sdk. I got sdk from the suggested link in the lesson. Could be i over looked it but i doubt it. I got a error to tell me the tools\.bat couldnt be found when i tried to launch sdk or avd. Is it because i used .exe instead of zip file? I read other forums and people have same issue (black cmd prompt screen that appears the closes), a few of them changed the Java path to get it to work but i dont know how to do that, or even if i need to. As of now im assuming its because i dont have .bat anywhere. Any ideas?
I didnt seem to ever have Android.bat anywhere any time i downloaded the sdk. I got sdk from the suggested link in the lesson. Could be i over looked it but i doubt it. I got a error to tell me the tools\.bat couldnt be found when i tried to launch sdk or avd. Is it because i used .exe instead of zip file? I read other forums and people have same issue (black cmd prompt screen that appears the closes), a few of them changed the Java path to get it to work but i dont know how to do that, or even if i need to. As of now im assuming its because i dont have .bat anywhere. Any ideas?
-
- Posts: 18
- Joined: Mon Aug 06, 2012 10:22 pm
Re: i cant get Android sdk or avd to work
Also the platform folder was empty, not sure if its supposed to be or not though
Re: i cant get Android sdk or avd to work
Have you tried it directly from a command prompt yet?
To get to a command prompt click the start button, then if you have windows xp, click "run" in the box type in cmd and click ok.
If you have windows vista or 7 (think vista works this way, but I skipped over it so not positive) click start and type cmd (no need to click run) it should show the cmd command at the top of the start menu. Click it and you should be at a prompt.
If on windows xp type
cd "\program files"
and hit enter
then type
cd android\android-sdk\tools
your prompt (to the left of the flashing cursor) should now look something like
c:\program files\android\android-sdk\tools >
type
dir
and hit enter
It should show a listing of files, one of which is hopefully android.bat if the file is there type
android
and hit return.
Make a note of any errors that appear and post them here.
I don't have access to my windows machine right this second, and don't recall exactly where sdk manager is, but I THINK its located 1 level up from the tools folder on windows.
so if you type
cd ..
and hit enter your prompt should show that you're now in the android-sdk folder
type
sdkman~1.exe
and hit enter (sdkman~1.exe is the 8.3 short filename of "sdk manager.exe")
Again make a note of any errors and post them here.
To get to a command prompt click the start button, then if you have windows xp, click "run" in the box type in cmd and click ok.
If you have windows vista or 7 (think vista works this way, but I skipped over it so not positive) click start and type cmd (no need to click run) it should show the cmd command at the top of the start menu. Click it and you should be at a prompt.
If on windows xp type
cd "\program files"
and hit enter
then type
cd android\android-sdk\tools
your prompt (to the left of the flashing cursor) should now look something like
c:\program files\android\android-sdk\tools >
type
dir
and hit enter
It should show a listing of files, one of which is hopefully android.bat if the file is there type
android
and hit return.
Make a note of any errors that appear and post them here.
I don't have access to my windows machine right this second, and don't recall exactly where sdk manager is, but I THINK its located 1 level up from the tools folder on windows.
so if you type
cd ..
and hit enter your prompt should show that you're now in the android-sdk folder
type
sdkman~1.exe
and hit enter (sdkman~1.exe is the 8.3 short filename of "sdk manager.exe")
Again make a note of any errors and post them here.