App is installed in Emulator but not run from Eclipse - android

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.

Related

Genymotion Android 5.0 Lollipop adb not connecting with Eclipse

With Genymotion latest update, able to boot the Android 5.0 lollipop image but not able to connect to it from Eclipse. Not able to launch app into it.
Following is the output seen in the Console WIndow of eclipse:
[2014-11-23 02:43:13 - MyApp] ------------------------------
[2014-11-23 02:43:13 - MyApp] Android Launch!
[2014-11-23 02:43:13 - MyApp] The connection to adb is down, and a severe error has occured.
[2014-11-23 02:43:13 - MyApp] You must restart adb and Eclipse.
[2014-11-23 02:43:13 - MyApp] Please ensure that adb is correctly located at 'C:\Users\homepc\Documents\code\adt-bundle-windows-x86_64-20140321\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe' and can be executed.
Anyone encoutered this problem and know a way to get around this? My setup is working perfectly fine when I have another Genymotion image running - like Android version 4.3 or 4.4.
INVESTIGATING ISSUE WITH MY SETUP - OLDER OS VERSIONS not working

An android virtual device that failed to load. click 'details' to see the error

I just installed the Android plugin in Eclipse. Created a new virtual device running on Android 4.0 API level 14 (Nexus S) but it wont emulate. I read on one post that I could move the android folder to another location so i did so and to no avail,it still wont emulate the android window will start and the 'ANDROID' text will load for days and days but does not go any further. (I usually just read but have never posted so forgive me for my format)
Examining the console this was the text available:
[2013-04-01 20:35:42 - Android Test] ------------------------------
[2013-04-01 20:35:42 - Android Test] Android Launch!
[2013-04-01 20:35:42 - Android Test] adb is running normally.
[2013-04-01 20:35:42 - Android Test] Performing com.theprogrammer.android.test.MainActivityMainActivity activity launch
[2013-04-01 20:35:43 - Android Test] Automatic Target Mode: launching new emulator with compatible AVD 'Phone_IceCreamSandwich'
[2013-04-01 20:35:43 - Android Test] Launching a new emulator with Virtual Device 'Phone_IceCreamSandwich'
[2013-04-01 20:35:55 - Android Test] New emulator found: emulator-5554
[2013-04-01 20:35:55 - Android Test] Waiting for HOME ('android.process.acore') to be launched...
[2013-04-01 20:37:12 - Android Test] HOME is up on device 'emulator-5554'
[2013-04-01 20:37:12 - Android Test] Uploading Android Test.apk onto device 'emulator-5554'
[2013-04-01 20:37:12 - Android Test] Installing Android Test.apk...
[2013-04-01 20:38:13 - Android Test] Success!
[2013-04-01 20:38:13 - Android Test] Failed to install Android Test.apk on device 'emulator-5554': device not found
[2013-04-01 20:38:13 - Android Test] com.android.ddmlib.InstallException: device not found
[2013-04-01 20:38:13 - Android Test] Launch canceled!
Here are the things you could do in this scenario:
Reinstall the ADT Android Eclipse Tools
Clean the Project
Try Manual Launch Mode in eclipse
Also, I've found these answers that may help you:
Question 1
Question 2
Take a look, see if it helps. Android is weird sometimes.
I found that patience is a virtue because the emulator will take time to boot up but it will eventually boot up just take note of the RAM size that u give it because it will actually take that from your physical memory.
EDIT
I would recommend using Genymotion as I have been using it ever since this error and it has worked quite fine for me. Migrating to another PC is also simple since you just move the virtual devices.

Incompatible Android target device?

I'm new to Android and was just trying to load a sample project (Bluetooth Chat application) onto my smartphone (running Android 2.3.4). The target build project in Eclipse uses Android API level 15 (Android 4.0.3). When I try "Run as Android Application" with the phone connected, the Android Device chooser indicates that the device in not compatible, and I get the errors shown in the text below. How do I get around this problem? Surely I shouldn't have to downgrade my build target to a lower API level (10) and possible loose functionality?
Btw, the same project includes this in the manifest:
<uses-sdk minSdkVersion="6" />
.
[2012-01-27 19:59:43 - BluetoothChat] Android Launch!
[2012-01-27 19:59:43 - BluetoothChat] adb is running normally.
[2012-01-27 19:59:43 - BluetoothChat] Performing com.example.android.BluetoothChat.BluetoothChat activity launch
[2012-01-27 19:59:43 - BluetoothChat] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2012-01-27 20:00:02 - BluetoothChat] WARNING: Application does not specify an API level requirement!
[2012-01-27 20:00:02 - BluetoothChat] Device API version is 10 (Android 2.3.4)
[2012-01-27 20:00:02 - BluetoothChat] Uploading BluetoothChat.apk onto device '304D1938E5584E7E'
[2012-01-27 20:00:02 - BluetoothChat] Installing BluetoothChat.apk...
[2012-01-27 20:00:03 - BluetoothChat] Re-installation failed due to different application signatures.
[2012-01-27 20:00:03 - BluetoothChat] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2012-01-27 20:00:03 - BluetoothChat] Please execute 'adb uninstall com.example.android.BluetoothChat' in a shell.
[2012-01-27 20:00:03 - BluetoothChat] Launch canceled!
Many thanks :)
[2012-01-27 20:00:03 - BluetoothChat] Re-installation failed due to different application signatures.
[2012-01-27 20:00:03 - BluetoothChat] You must perform a full uninstall of the application. WARNING: This will remove the application data!
The app already exists on your device, signed with one signing key. You are trying to install over top of it another copy of the same app (i.e., same package) with a different signing key.
Please remove the existing BluetoothChat app from your device (e.g., through Settings), then run the app.
The target build for your project should be 10 here, that would allow the project to run on devices >= api 10.
As it says, the key used to sign the BluetoothChat sample on your phone (maybe a release key?) is different from the one you're using to run it (debug key). Uninstall the app on your phone and (when it's not on your phone) select "Run as Android Application".
You can't upgrade an app (essentially what "Run as Android Application" does) if the keys are not the same.

Android SDK Eclipse Error

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

Can't deploy Android/Google Maps app from eclipse

I'm an android newbie having a lot of troubles with the android emulator. I have inconsistent luck in starting up the emulator, and no luck if I start it from within eclipse instead of from the commandline (it waits forever and never boots -- not even after 24 hours).
However, since I figured out how to get it to (sometimes!) start from the command line, I have a workaround to that particular problem. But I have no workaround for my latest problem. When I try to run it:
[2010-08-09 22:08:12 - MyApp] ------------------------------
[2010-08-09 22:08:12 - MyApp] Android Launch!
[2010-08-09 22:08:12 - MyApp] adb is running normally.
[2010-08-09 22:08:12 - MyApp] Performing com.android.MyApp.MyApp activity launch
[2010-08-09 22:08:12 - MyApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'TestDroid'
[2010-08-09 22:08:12 - MyApp] WARNING: Application does not specify an API level requirement!
[2010-08-09 22:08:12 - MyApp] Device API version is 8 (Android 2.2)
[2010-08-09 22:08:14 - MyApp] Uploading MyApp.apk onto device 'emulator-5554'
[2010-08-09 22:08:14 - MyApp] Installing MyApp.apk...
[2010-08-09 22:08:15 - MyApp] Success!
[2010-08-09 22:08:15 - MyApp] Starting activity com.android.MyApp.MyApp on device
But nothing starts on my android instance. MyApp doesn't even show up on the app list.
I assume I'm doing something wrong?
Try looking at the adb logcat output, it might show some errors. Also, does your app specify a launcher Activity?
I think I may have fixed this by (possibly) resolving my emulator startup bug.

Categories

Resources