Android SDK Eclipse Error - android

I'm trying to get some of the samples to run from the Android SDK samples but am having troubles getting them to run on my device.
I am running windows 7 64-bit and my device is an LG Optimus Slider.
I installed the SDK through eclipse indigo (the SDK is the 2.1 version).
I am able to successfully run the samples on an Android Virtual Device but when I try on my LG Optimus SLider I get the following:
[2012-01-02 16:39:57 - ApiDemos] ------------------------------
[2012-01-02 16:39:57 - ApiDemos] Android Launch!
[2012-01-02 16:39:57 - ApiDemos] adb is running normally.
[2012-01-02 16:39:57 - ApiDemos] Performing com.example.android.apis.ApiDemos activity launch
[2012-01-02 16:39:57 - ApiDemos] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2012-01-02 16:40:03 - ApiDemos] WARNING: Application does not specify an API level requirement!
[2012-01-02 16:40:03 - ApiDemos] WARNING: Unknown device API version!
[2012-01-02 16:40:03 - ApiDemos] Uploading ApiDemos.apk onto device 'A10000199B0EF7'
[2012-01-02 16:40:04 - ApiDemos] Installing ApiDemos.apk...
[2012-01-02 16:40:04 - ApiDemos] Failed to install ApiDemos.apk on device 'A10000199B0EF7!
[2012-01-02 16:40:04 - ApiDemos] closed
[2012-01-02 16:40:04 - ApiDemos] Failed to install ApiDemos.apk on device 'A10000199B0EF7': closed
[2012-01-02 16:40:04 - ApiDemos] com.android.ddmlib.InstallException: closed
[2012-01-02 16:40:04 - ApiDemos] Launch canceled!
Also might be related, when the device chooser comes up in eclipse the target on my device is listed as unknown.
Any help would be appreciated, thanks.

I hope at least one of the following will help:
You have to uninstall the application from the application manager
on your cellphone before you can install it again.
Also check the version compatibilty issue
Apparently, your device is not properl connected

Related

Android ADB keeps crashing - can't debug on device when using a usb 3.0 port

I just bought a new pc. Installed all the stuff to develop android apps, just like on my old pc. I've installed eclipse Juno on my new pc incase it matters..
Here is the problem, i cant debug on a real device. On any AVD it works just fine, but when i try to run a project on my real device (Galaxy Nexus) i get the following erros:
first run i get:
[2012-10-12 09:55:17 - SlideMenuExample] Android Launch!
[2012-10-12 09:55:17 - SlideMenuExample] adb is running normally.
[2012-10-12 09:55:17 - SlideMenuExample] Performing com.coboltforge.slidemenuexample.MainActivity activity launch
[2012-10-12 09:55:21 - SlideMenuExample] Uploading SlideMenuExample.apk onto device '0149C6F11601A009'
[2012-10-12 09:55:26 - SlideMenuExample] Failed to install SlideMenuExample.apk on device '0149C6F11601A009': timeout
[2012-10-12 09:55:26 - SlideMenuExample] Launch canceled!
second run:
[2012-10-12 10:01:48 - SlideMenuExample] Android Launch!
[2012-10-12 10:01:48 - SlideMenuExample] adb is running normally.
[2012-10-12 10:01:48 - SlideMenuExample] Performing com.coboltforge.slidemenuexample.MainActivity activity launch
[2012-10-12 10:01:53 - SlideMenuExample] Uploading SlideMenuExample.apk onto device '0149C6F11601A009'
[2012-10-12 10:01:53 - SlideMenuExample] Installing SlideMenuExample.apk...
[2012-10-12 10:01:54 - SlideMenuExample] Success!
[2012-10-12 10:01:54 - SlideMenuExample] Failed to install SlideMenuExample.apk on device '0149C6F11601A009': device not found
[2012-10-12 10:01:54 - SlideMenuExample] com.android.ddmlib.InstallException: device not found
[2012-10-12 10:01:54 - SlideMenuExample] Launch canceled!
third run gets stuck on launching project on 100%, than nothing happends.
fourth run: Yes finnaly the app is succesfully installed (probleb solved? nope)
fifth run gets stuck again on 100% and eclipse crashed completely. After i got eclipse restarted i see the following error in the error log:
java.lang.NullPointerException
at com.android.ide.eclipse.adt.AdtPlugin.getDisplay(AdtPlugin.java:334)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launch(AndroidLaunchController.java:595)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.doLaunch(LaunchConfigDelegate.java:322)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:238)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Please can anyone help me with solving this.
I already re-installed eclipse and android SDK.
run eclipse as admin
adding platform-tools and tools folder of the android sdk to
enviroment variables
Increasing ADB connection time out to 20000
EDIT
At the back of my pc i got two 2.0 usb-ports (not 3.0 like the the ports in the front). I dont get any trouble when using them..
but i'm still interested why the usb 3.0 port dont work?
I don't know - adb.exe is always crashing. All of my ports are USB 3.0. Windows 7, latest updated, Google USB Driver, latest update (9).
Uninstalled the Google USB Driver and the problem went away...

App is installed in Emulator but not run from Eclipse

I am working on an application which I am trying to run on 3.x or 4.x versions of android OS. It runs fine on 2.x versions. When i run the application from eclipse i see the following log:
[2012-01-10 18:46:20 - myApp] ------------------------------
[2012-01-10 18:46:20 - myApp] Android Launch!
[2012-01-10 18:46:20 - myApp] adb is running normally.
[2012-01-10 18:46:20 - myApp] Performing com.my.app.activities.SplashScreenActivity activity launch
[2012-01-10 18:48:59 - myApp] Uploading myApp.apk onto device 'emulator-5554'
[2012-01-10 18:49:04 - myApp] Installing myApp.apk...
[2012-01-10 18:51:06 - myApp] Failed to install myApp.apk on device 'emulator-5554!
[2012-01-10 18:51:06 - myApp] (null)
[2012-01-10 18:51:06 - myApp] Failed to install myApp.apk on device 'emulator-5554': device offline (x)
[2012-01-10 18:51:06 - myApp] com.android.ddmlib.InstallException: device offline (x)
[2012-01-10 18:51:06 - myApp] Launch canceled!
And it seems as if app installation is failed. But that's not case. When I check the Application section of the emulator (I mean installed apps), my app's logo is there and it runs absolutely fine from there. What was the problem it didn't run from eclipse? And it was actually installed but showed the message 'installation failed'. As I am unable to run it through eclipse so no more logs available. Please help me out of this.
Thanks in advance...!!!!
You can target a newer SDK and support older ones by including something like this in your manifest:
<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:targetSdkVersion="14" />
EDIT: Explanation... http://developer.android.com/resources/dashboard/platform-versions.html
Android version - Codename - API version
Android 1.5 - Cupcake - 3
Android 1.6 - Donut - 4
Android 2.1 - Eclair - 7
Android 2.2 - Froyo - 8 Android 2.3 - Android 2.3.2 Gingerbread - 9
Android 2.3.3 - Android 2.3.7 - 10
Android 3.0 - Honeycomb - 11
Android 3.1 - 12
Android 3.2 - 13
Android 4.0 - Android 4.0.2 Ice Cream Sandwich - 14
Android 4.0.3 - 15
So you can build/compile for API 15 with <uses-sdk android:targetSdkVersion="15" />
but also support everything down to Android 1.6 by adding <uses-sdk android:minSdkVersion="3" />
Hope that makes a little more sense.

Project load is successful, new emulator opens, but with no content

I created a new AVD and things seemed to be going so swimmingly well. Yes a couple warnings and failures, but then apparent success - "Installing Tic-Tac-Toe.apk... Success! Starting activity... Starting: Intent" But nothing appears in the emulator, and underneath the date and time on the emulator screen is, "Charging (50%)" whatever that means.
Any ideas are tremendously appreciated.
Bruce
[2012-01-02 19:55:32 - Tic-Tac-Toe] ------------------------------
[2012-01-02 19:55:32 - Tic-Tac-Toe] Android Launch!
[2012-01-02 19:55:32 - Tic-Tac-Toe] adb is running normally.
[2012-01-02 19:55:32 - Tic-Tac-Toe] Performing com.wiley.fordummies.androidsdk.tictactoe.SplashScreen activity launch
[2012-01-02 19:55:32 - Tic-Tac-Toe] Automatic Target Mode: launching new emulator with compatible AVD 'TrialAVD'
[2012-01-02 19:55:32 - Tic-Tac-Toe] Launching a new emulator with Virtual Device 'TrialAVD'
[2012-01-02 19:56:02 - Emulator] emulator: warning: opening audio input failed
[2012-01-02 19:56:02 - Emulator]
[2012-01-02 19:56:05 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
[2012-01-02 19:56:05 - Tic-Tac-Toe] New emulator found: emulator-5554
[2012-01-02 19:56:05 - Tic-Tac-Toe] Waiting for HOME ('android.process.acore') to be launched...
[2012-01-02 19:57:34 - Tic-Tac-Toe] WARNING: Application does not specify an API level requirement!
[2012-01-02 19:57:34 - Tic-Tac-Toe] Device API version is 12 (Android 3.1)
[2012-01-02 19:57:34 - Tic-Tac-Toe] HOME is up on device 'emulator-5554'
[2012-01-02 19:57:34 - Tic-Tac-Toe] Uploading Tic-Tac-Toe.apk onto device 'emulator-5554'
[2012-01-02 19:57:37 - Tic-Tac-Toe] Installing Tic-Tac-Toe.apk...
[2012-01-02 19:58:35 - Tic-Tac-Toe] Success!
[2012-01-02 19:58:35 - Tic-Tac-Toe] Starting activity com.wiley.fordummies.androidsdk.tictactoe.SplashScreen on device emulator-5554
[2012-01-02 19:58:36 - Tic-Tac-Toe] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.wiley.fordummies.androidsdk.tictactoe/.SplashScreen }

Emulator Not Working in Eclipse

Hello everyone I can't seem to figure out why my emulator isn't working and I don't get the error in the console
Here is what it says in the console
[2011-08-24 16:28:59 - MePlayer] Android Launch!
[2011-08-24 16:28:59 - MePlayer] adb is running normally.
[2011-08-24 16:28:59 - MePlayer] Performing com.meplayer.afajje.MePlayer activity launch
[2011-08-24 16:28:59 - MePlayer] Automatic Target Mode: Preferred AVD 'Droid' is not available. Launching new emulator.
[2011-08-24 16:28:59 - MePlayer] Launching a new emulator with Virtual Device 'Droid'
[2011-08-24 16:29:01 - Emulator] invalid command-line parameter: Files.
[2011-08-24 16:29:01 - Emulator] Hint: use '#foo' to launch a virtual device named 'foo'.
[2011-08-24 16:29:01 - Emulator] please use -help for more information
This error occurs on Version 12/13. You SDK path contains spaces. Move it to space-less path or if it is in Program Files change the path in Window->Preferences select Android
C:\PROGRA~1\Android\android-sdk

Android device not found

I'm trying to build "Hello, Android" with the Android SDK, but Android won't say "hello" to me.
I build with the 2.6 version of the SDK and run in Eclipse on Win XP. (I've installed the plug-in.)
Here's what I get:
[2009-09-23 16:35:19 -
HelloAndroid]Android Launch!
[2009-09-23 16:35:19 -
HelloAndroid]adb is running normally.
[2009-09-23 16:35:19 -
HelloAndroid]Performing
com.example.helloandroid.HelloAndroid
activity launch
[2009-09-23 16:35:19 -
HelloAndroid]Automatic Target Mode:
launching new emulator with compatible
AVD 'my_avd'
[2009-09-23 16:35:19 -
HelloAndroid]Launching a new emulator
with Virtual Device 'my_avd'
[2009-09-23 16:35:21 -
HelloAndroid]New emulator found:
emulator-5554
[2009-09-23 16:35:21 -
HelloAndroid]Waiting for HOME
('android.process.acore') to be
launched...
[2009-09-23 16:36:20 -
HelloAndroid]HOME is up on device
'emulator-5554'
[2009-09-23 16:36:20 -
HelloAndroid]Uploading
HelloAndroid.apk onto device
'emulator-5554'
[2009-09-23 16:36:30 -
HelloAndroid]Installing
HelloAndroid.apk...
[2009-09-23 16:36:43 -
HelloAndroid]Success!
[2009-09-23 16:36:44 -
HelloAndroid]Starting activity
com.example.helloandroid.HelloAndroid
on device
[2009-09-23 16:36:44 -
HelloAndroid]Launch error:
device (emulator-5554) request
rejected: device not found
I got this to work. It may be a timing issue. Have to press Menu button on emulator keypad to unlock the screen. Then the output is displayed.

Categories

Resources