I'm new in Android. I'm starting with HelloWorld program, but I can't run it on the Emulator. I'm using newest version of Eclipse and Android SDK. I also set up development environment as follows instructions on http://developer.android.com/index.html.
Does anybody have advice for me?
OMG!!! My problem is nothing :)) i must wait the emulator in a long time after that my program will be loaded. I watched a tutorial clip on YOUTUBE and i saw the boot screen of the emulator is as like as the emulator in my machine. Thanks all for help!
Do you get any errors?
if this is your first app, its probably to do with setup and enviroment. Whats your system spec?
I found running the install process - you have to make sure you follow the installation process in a good sequence. Eclipse, android platform. Java enviroment then ADT plugin.
the AVD Manager updater should have taken a long time to get everything you need when you run it.
If it failed - There is a little check box in the settings of the AVD manager that allows you to force download the HTTP -
But as long as you've got the lot, and your building a 2.1 file.
Also, the first time you run the emulator, it'll sit quiet for a worrying amount of time. Just make tea, watch TV - google kayden kross and it'll be fine.
Make sure you create an emulator image (AVD) or you won't be able to run it.
also for other newbies , just right click the project and say "debug as -> android" .
Related
I am trying to start development on an Android app using Android Studio, but whenever I try to run the app I get the error Unable to obtain result of 'adb version' I have tried uninstalling and reinstalling Android Studio multiple times on different computers (both running Windows 10) and every time I get the same error. I have researched the problem and have been unable to find a consistent solution. (or one that actually works) I am very new to Android development and am slightly at a loss as to what to do; any help on solving this problem would be much appreciated.
Found the solution thanks to #user3109468, Android Studio had the directory for the Android SDK wrong. In File>Project Structure make sure the directory for the SDK is correct; mine was C:\Users\[user]\AppData\Local\Android\sdk (Google had given sdk a capital "S" for some reason...)
Uncheck: enable adb integration from Tools>Android and re-enable it.
This worked for me.
This might be because of windows virtual memory problem.
Try running adb from command line. something like
adb version BTW, platform-tools would be located in
c:\Users\<your userid>\AppData\Local\Android\sdk\platform-tools
How much it takes from you firing a command and actually gets an answer ?
if it takes more than 5 seconds, then android studio times out waiting for an answer and throws up an error.
How to fix ?
close all your program ( Process ? )
and go to control panel -> System->advance System settings-> Advanced tab->performance->settings->Advance->Virtual memory change
Try to reduce virtual memory size. Fr e.g. If it's 4096Mb make it 2048Mb ( both initial and maximum) It will ask to restart, so restart and get yourself a cup of coffee, because it will take a while. Then, once your system is up , try running adb version. Does it run quickly ? If yes, problem is fixed. Go back to virtual memory and increase it's size to the one before, and that's it.
BTW, I noticed in my case that simple hello world program was taking 20 sec to execute on my machine before fixing virtual memory problem.
Make sure Android SDK location and Android NDK location is correct.
Go to File -> Project Structure.
Set the Android SDK location and Android NDK location.
Help me with getting started with Android Studio...
I have just installed Android studio Bundle (nearly 850 mb).
Than I installed some SDK components as shown in pic...
After I start android studio and compile default source code
I get this:
Then when I execute it it shows this:
How do I get Proper Out put?
It is striking through ActionBarActivity Class because this class is deprecated. AppCompatActivity is used instead since version 22.1.0. More infos here : http://developer.android.com/tools/support-library/index.html and here : http://android-developers.blogspot.com/2015/04/android-support-library-221.html
For the output on your emulator, it takes time to start and emulate as android. You should be patient. :) Personnaly, I've never succeeded in running the android emulator on my Windows machine. I always got output just like you. But when I installed android studion on my Linux machine, it just took me something like 2-5 minutes the first time I launched it. So you know now what you have to do. :)
Its emulator, it might take some time to start and emulate as android.
When emulator is read then your application will be executed as application not as console until you use android API for sending log output like "Log.d()" .
You should start training and follow guide from android's site : http://developer.android.com/training/index.html
I have created a VM Ubuntu 14.04 using Vmware Player, and I've installed the ADT environment for Android Development.
I have created a new Android emulator using the shortcuts present in Eclipse; when I tried to start emulator I got the following known error:
Starting emulator for AVD 'AVD_for_Nexus_5_by_Google'
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
- Use the '-force-32bit' option when invoking 'emulator'.
- Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.
Either one will allow you to use the 32-bit binaries, but please be
aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.
I fixed it in both ways: putting a variable in my .bashrc:
export ANDROID_EMULATOR_FORCE_32BIT=true
and also setting the emulator option in the Eclipse preference dialog:
Nevertheless, every time I try to start the emulator I got always the same error.
The wierd thing is that if I try to start the emulator from a bash window, it starts normally.
This could have been a boring workaround, but I would have been happy anyway. The problem is that when I try to deploy an application from Eclipse, the emulator started in this way is shown as "Offline" and I cannot run any application on it. Possibly I can upload the apk into the emulator from the command line, but debugging the app would become a bit harder.
Has anyone got the same problem or does know how to fix it?
I found out a partial solution for connecting eclipse to the running emulator started by command line: the emulator MUST be started with no snapshots.
Indeed, if I start the emulator without snaspshots, it become "online" in DDMS, and I can finally use it.
Although this could be a bit annoying, because starting the emulator from scratch every time it takes a long time, at least I have a way to use it.
On the other hand, I don't know exactly the reason of this behavior, if someone has an answer it will be appreciated.
Moreover, I still do not have idea why I'm not able to start the emulator from Eclipse.
I'm a n00b trying to get the HelloWord application from the Google developer example up and running. I'm using Eclipse 3.7.1 on Ubuntu 11.10 w/ the latest Android SDK and ADT. I've got through the whole thing up until the running of the application where the emulator loads, but just freezes w/ a blank screen. The window it's in becomes unresponsive and I end up having to sudo kill the process to get rid of it.
I've read around and heard that it can take 10 min or so to load up the first time, but I've gone ahead and let it sit there for much longer, only to have nothing to show for it.
Anyone out there have any ideas?
Thanks in advance.
How are you initialising your emulator, maybe you can try with another emulator,, make click on Window--> AVD manager. click on new create on and put start selecting the one you created, also you should verify that you have Java installed on your computer.
Nut maybe you can explain all the thing you did to set up your environment so we can check a possible error, I have Eclipse 3.7.1 with the latest Amndroid SDK running perfectly on my Ubuntu 11.10
I recently got introduced to Android via a school course. Did some very simple examples earlier, and decided to installed all the required peripherals at my home computer too. I was on my way to develope all kind of cool stuff, until i noticed that something is wrong with my Android SDK or the emulator itself - it won't run any of the programs i try to.
I've got Eclipse & All the required add-ons / plugins installed. I get no error messages at any stage ( in eclipse or in the emulator itself ). Whenever i press run at Eclipse, the emulator takes it's time and starts up, but doesn't start the program, and doesn't actually show even the slightest hint of it. Looks just like if i had tried to start only the emulator. I've tried to create several different AVD's, and tried to use different versions of Android on them. No luck.
Im using windows 7 x64, and after a couple of rounds with Google, i found a few other guys who are having the same problem with the same OS.
Any help is greatly appreciated, as im running out of options here.
You need 32 bit eclipse and 32 bit JVM. There should be an error in the "console" window in eclipse if you hit run.
Click on the Menu button of the emulator to unlock it. You may then need to rerun the app.