Eclipse with Android does not respond - android

I've installed Eclipse and the Android SDK but I just cant get to everything working properly. After 2 days I managed to create a working emulator that actually shows am Android interface (instead of a black screen with Android text), but I have absolutely no idea why it didnt work for the first two days. After that, I´ve had problems with the ADB and I also managed to fix that. And still my problems aren't over. I now have a problem with installing the sample APK files into my emulator, but I dont get any error messages, which makes it really hard to find a solution for.
I.e. I've loaded 2 different projects (bbbb and Snake) and after pressing run the emulator starts up. BUt then, nothing happens. I have copy-pasted an exert of the console below.
[2011-10-21 20:29:59 - bbbb] WARNING: Application does not specify an API level requirement!
[2011-10-21 20:29:59 - bbbb] Device API version is 14 (Android 4.0.1)
[2011-10-21 20:29:59 - bbbb] Uploading bbbb.apk onto device 'emulator-5554'
[2011-10-21 20:29:59 - bbbb] Installing bbbb.apk...
[2011-10-21 20:59:28 - Snake] ------------------------------
[2011-10-21 20:59:28 - Snake] Android Launch!
[2011-10-21 20:59:28 - Snake] adb is running normally.
[2011-10-21 20:59:28 - Snake] Performing com.example.android.snake.Snake activity launch
[2011-10-21 20:59:31 - Snake] WARNING: Application does not specify an API level requirement!
[2011-10-21 20:59:31 - Snake] Device API version is 14 (Android 4.0.1)
[2011-10-21 20:59:31 - Snake] Uploading Snake.apk onto device 'emulator-5554'
[2011-10-21 20:59:31 - Snake] Installing Snake.apk...
As you can see, the console just stops after the Installing .apk... line (and yes I have waited for 30 minutes just to be sure). Why don't I get a time-out or error message?
I really dont know what to do now. And I cant find any answers on this on the web. Can anyone please help me. I really want to start some actual programming instead of this. I am using Windows 7.

Your app does not specify a API level. Go to Window ----> Preferences and then android. Pick a API level.

Instead of starting with Snake.apk, you should try starting with the example project that is created when you create a new android project with eclipse.
Alternatively you can create a new project with the android command like this:
android create project --target 9 --name HelloWorld --path . --activity HelloWorld --package com.example.helloworld
After you've created this, make an emulator with version 2.3 (android 9) and try that.
I don't know if you should mess with android 14 yet if you aren't familiar with android at all given no device out yet has Ice cream sandwich yet so you won't be able to test with a real device until next month at least.
If you are planning to target honeycomb (tablet) devices you can start with version 13 and create an emulator for that. By the way, what are the specs like on your PC? It takes a pretty fast machine to run the emulator. The android emulator is notoriously slow.
Anyways, I'd start with the most basic of projects, which is the template project android creates for you when you start a new project.. Once that works you can continue with your own project.

create new AVD with 1.5 sdk version.
Try to start with minimum sdk version(1.5).and specify your minimum sdk version while creating project.
also make the emulator skin as qvga(smallest).

Related

'No active compatible AVD's or devices found

I'm new with Eclipse ADT, and I tried to run an app on my tablet (a Samsung Galaxy Note 10.1), but there is an error as below:
[2013-12-26 12:37:41 - SDK_Example] ------------------------------
[2013-12-26 12:37:41 - SDK_Example] Android Launch!
[2013-12-26 12:37:41 - SDK_Example] adb is running normally.
[2013-12-26 12:37:41 - SDK_Example] Performing com.metaio.Example.MainActivity activity launch
[2013-12-26 12:37:41 - SDK_Example] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.
Can anyone tell me why my device isn't found?
So if you are using emulator then close it.
In Eclipse select Run > Run Configurations > Target > Always prompt to pick device > Run.
Now select a a device from the list or a launch a new emulator. The next time you Run the project it should work.
Seems like your device is not getting detected by the ADB.
Check if you have enabled USB debugging in your tablet or not. Sometimes disconnecting and re-connecting the device also makes it work. Also bear in mind that the API level of your application should be supported by your device.
The error shows that the API level which your application having the compatible emulator for that API level does not exists. You need to create the emulator compatible to your application's api level.
OR
If your emulator is already started then You need to reset the ADB to make the emulator available. Go to DDMS > In Device tab > Select Down arrow> Select Reset adb option.
Check out the image
This error message will appear , if there are no compatible android API in SDK is found. Try to update your eclipse with appropriate API. To update your API go to Window -> Android SDK Manager. Then choose required API version from Android SDK Manager window. Finally press install packages button .After required packages installation completed, create new AVD for your project and Run your project.
You have to create an emulator or use a device that is compatible with API target. i.e the device or emulator should have a android version that is compatible with your project.
I had the same problem. I had usb debugging set and eclipse was running the app fine and then it stopped one day. I discovered, with the help of other comments here that my phone had to be set as a mass storage device otherwise it wouldn't work. Once I changed it from camera, or another setting to mass storage it worked. I must have played with the usb setting and changed it. The manual didn't mention that mass storage was necessary.
In androidmanifest.xml try to support the version from API level 8 onward
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
and even try to unable USB debugging in your mobile ..
Before to that you should have Mobile sync installed in the system...
once you try to edit the code in the project and even try to clean the project and run it ..,

Cannot Target Physical Devices

I cannot select either of my devices from the ADT device manager. This is a (nearly) fresh install of the ADT direct from Google. About a year ago I was using the Android plugin for Eclipse, but since that didn't work either I installed the ADT.
I have installed and updated everything under Tools, Android 4.2, and Extras in the Android SDK manager. I haven't installed anything else.
I have both a Nexus 7 (4.2.2) and a Samsung Fascinate (2.3.5) that I am trying to send my app to. I'm using the USB cable that shipped with my Nexus 7 to connect the devices to my computer. Both have USB Debugging checked.
I have not changed anything inside my test project, everything is as it was from just clicking next through the project builder.
I am using the default launch configuration, all the settings are default as well except for the Project. Here is the full console log from loading the ADT to after attempting to run on my device:
[2013-02-20 18:53:42 - test] ------------------------------
[2013-02-20 18:53:42 - test] Android Launch!
[2013-02-20 18:53:42 - test] adb is running normally.
[2013-02-20 18:53:42 - test] Performing com.example.test.MainActivity activity launch
[2013-02-20 18:53:42 - test] Failed to find an AVD compatible with target 'Android 4.2'.
[2013-02-20 18:54:42 - test] Performing com.example.test.MainActivity activity launch
[2013-02-20 18:54:45 - test] Launch canceled!
The 6th log entry occurs after the ADT gives me a dialog that says "No compatible targets were found. Do you wish to add a new Android Virtual Device?," to which I press no. The Android Device Chooser then appears, and there are no devices for me to pick from.
I have Googled that 5th log, but it turned up nothing that worked. They suggested that I change the minimum and target versions, or that I use a virtual device. I'd like to use my physical devices if possible. Thanks for any help.
Have you installed your OEM usb drivers? Have a look at this link:
http://developer.android.com/tools/extras/oem-usb.html

Android emulator doesn't start anymore

I'm running on OSX Mountain Lion. I recently installed the latest version of Eclipse and the Android SDK from Eclipse. I updated the SDK through Eclipse as well, downloading everything in the Extras, Android 2.2 (API 8), Android 4.1.2 (API 16) and the Tools folder.
Finally I could run the emulator by creating a device but it was very slow (I have 250gb ssd hard drive + 16gb RAM), I couldn't even run the application I had. I tried to modify some options of the emulator and now apparently I can't run anything anymore. As soon as I try to run a program (Hello World) I get the following infamous Mac OSX error:
emulator-arm quit unexpectedly.
The console output for Eclipse is the following:
[2012-10-19 15:46:06 - test] Android Launch!
[2012-10-19 15:46:06 - test] adb is running normally.
[2012-10-19 15:46:06 - test] Performing com.example.test.MainActivity activity launch
[2012-10-19 15:46:06 - test] Automatic Target Mode: launching new emulator with compatible AVD 'test'
[2012-10-19 15:46:06 - test] Launching a new emulator with Virtual Device 'test'
I tried to reset things as they were before as well as creating a new emulator device. I tried to restart Eclipse and the machine itself but nothing. Apparently I can't run any Android application anymore.
Does somebody has some idea? I read on some similar thread to use adb to restart the thing, but apparently I can't get that running as well. By doing ./adb shell I get error: device not found. Do you have any idea about what can I do to solve the issue?
Thanks
The problem is essentially the AVD manager can’t re-open a virtual device that was on a second monitor on a Mac. The work around is to edit the following file
~/.android/avd/.avd/emulator-user.ini
(depending on your system, this may be at ~/.android/avd/Default.avd/emulator-user.ini too)
and change the window.x and window.y entries to
window.x=0
window.y=0
Source: http://timvoet.com/2013/01/04/avd-emulator-crashes-on-mac/
FWIW I noticed that running VirtualBox seems to get a lock on HAX which prevents android emulator window from ever opening. Closing VirtualBox seems to release the lock and everything works again.
Update your android sdk. In eclipse it should be an button next to the open avd manager button. or from command line try android update sdk --no-ui.
the following link should help scroll down to see how to update. https://wiki.appcelerator.org/display/guides/Installing+and+Updating+Android+SDK
I had the same problem but the suggested ideas didn't solve my problem, after swearing and waving my fist at the Gods, I worked backwards to when it WAS working, and decided to change my SDK Tools version back from the Android SDK Tools RC 22.6 to Android SDK Tools 22.3.
Start up emulator64-x86 4.4.2 intel atom instance and low and behold it works again.
2 valuable hours later... Gotta love working with Android. :O
Moral of the story don't use the Preview Channel Releases.

Android 2.1 Emulator doesn't load, even after waiting a long time

I'm trying to get into Android app developing. My first problem is actually getting the emulator to run. I am using the official Hello World tutorial to get me started, and it works fine with my 4.0.3 AVD, but when I try it with a new 2.1 AVD (also created the project from start using 2.1), the emulator doesent load up.
Although it tries to load, the "Android" letters from the start are not with the usual font, they just apear as a "Typewriter" type font with a underscore after, and when they disapear, nothing shows up. I have waited up to 1 hour for it to boot, to no avail.
I already searched stackoverflow for answers, but since I dont have a significant error showing up, I can't find the answer.
My log is the following:
[2012-02-07 11:23:09 - Hello World 21] Android Launch!
[2012-02-07 11:23:09 - Hello World 21] adb is running normally.
[2012-02-07 11:23:09 - Hello World 21] Performing com.hello.world.HelloWorld21Activity activity launch
[2012-02-07 11:23:09 - Hello World 21] Automatic Target Mode: launching new emulator with compatible AVD '2.1'
[2012-02-07 11:23:09 - Hello World 21] Launching a new emulator with Virtual Device '2.1'
[2012-02-07 11:23:14 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
[2012-02-07 11:23:14 - Hello World 21] New emulator found: emulator-5554
[2012-02-07 11:23:14 - Hello World 21] Waiting for HOME ('android.process.acore') to be launched...
Running Eclipse Classic with the ADT plugin, and the normal Android SDK, following every instruction on http://developer.android.com/resources/tutorials/hello-world.html .
Thank you!
I have encountered a similar problem with the emulator startup when using the 64bit version of Windows 7. I couldn't get it to start with a 2.1 or 2.2 AVD (I experienced a similar behavior as the one you describe), however I did not try an AVD for newer OS versions than 2.3. So if you are running on a 64 bit OS, I would suggest you to try a 32-bit version - it helped in my case.
Android Emulator is rather slow software. It's start up speed depends directly on your hardware. Also appearing of "Typewriter" Android label is typical for Android 2.x versions.
Try to reboot the emulator.
Took my time but I fixed the problem.
Just use your integrated graphic card as default graphic processor.
If you are using a CUDA capable (or similar) graphic card disable it. Just don´t run your software (eclipse, AVD...) with your CUDA graphic processor. Eclipse produces assert errors with CUDA and AVD stops working. Flash player doesn't work either with CUDA enabled.
That worked for me, lucky I'm using a laptop.

How to launch an android application in eclipse

So I've done the "Hello, World" tutorial on the android developer site. Instructions on how to launch the application:
1) Select Run > Run.
2) Select "Android Application".
Simple enough. Except what starts is the android default launcher, not the application. How do I get the actual application to start?
Code is a copy paste from: http://developer.android.com/resources/tutorials/hello-world.html
Edit: Haven't tried logcat yet, but the console gives me:
[2011-08-23 15:57:19 - HelloAndroid] Android Launch!
[2011-08-23 15:57:19 - HelloAndroid] adb is running normally.
[2011-08-23 15:57:19 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-08-23 15:57:19 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'MyPhone'
[2011-08-23 15:57:19 - HelloAndroid] Launching a new emulator with Virtual Device 'MyPhone'
Edit2: Apparently this is a known problem. The solution provided by google doesn't work for me, but might for someone else: http://developer.android.com/resources/faq/troubleshooting.html#eclipse
Edit3: I've found numerous people with the same problem, but no solutions so far. Workaround: use a physical device. The program runs fine on my Nexus One. I'm leaving the question for now, can't spend more time on this.
Right click to your project -> Run As -> Android Application
Right click on your project and select Run -> Run as -> Android Application.
Sometimes it doesn't start the application. You can launch the menu and you would see your application installed there. You can then manually launch the application.
Sometimes trying to run the application multiple times from Eclipse as well helps!
This may happen if another project (even a non Android project) is selected in your Eclipse workspace tree.
In that case, the Run command will be applied to this project even if a source file of HelloWord is opened on the edition screen.
Ensure that a source file of HelloWorld, or the project HelloWorld itself, is selected.
Or you may just need to unlock the Emulator that started.
When running the app from Eclipse, an emulator is started. But it appears locked. You have to unlock it to make the keyguard to disappear, as if it was an actual cellphone.

Categories

Resources