I am trying to create a new app with Eclipse. Things seem to work fine if I run through the emulator, but I cannot deploy it to my phone.
I have an original Motorola Droid, rooted running Gingerbread.
In the console, I get:
[2011-05-30 15:13:30 - MapsDemo] ------------------------------
[2011-05-30 15:13:30 - MapsDemo] Android Launch!
[2011-05-30 15:13:30 - MapsDemo] adb is running normally.
[2011-05-30 15:13:30 - MapsDemo] Performing com.example.android.apis.MapsDemo activity launch
[2011-05-30 15:13:30 - MapsDemo] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2011-05-30 15:13:34 - MapsDemo] WARNING: Application does not specify an API level requirement!
[2011-05-30 15:13:34 - MapsDemo] Device API version is 10 (Android
2.3.4)
[2011-05-30 15:13:34 - MapsDemo] Uploading MapsDemo.apk onto device '0403626109009013'
[2011-05-30 15:13:35 - MapsDemo] Installing MapsDemo.apk...
[2011-05-30 15:13:35 - MapsDemo] Success!
[2011-05-30 15:13:35 - MapsDemo] Starting activity com.example.android.apis.MapsDemo on device 0403626109009013
And in logcat I get:
05-30 15:30:11.922: DEBUG/AndroidRuntime(5718): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
05-30 15:30:11.922: INFO/AndroidRuntime(5718): Heap size: -Xmx40m
05-30 15:30:11.922: DEBUG/AndroidRuntime(5718): CheckJNI is OFF
05-30 15:30:11.922: WARN/dalvikvm(5718): JNI_CreateJavaVM failed
05-30 15:30:11.922: ERROR/AndroidRuntime(5718): JNI_CreateJavaVM failed
05-30 15:30:12.164: DEBUG/AndroidRuntime(5721): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
05-30 15:30:12.164: INFO/AndroidRuntime(5721): Heap size: -Xmx40m
05-30 15:30:12.164: DEBUG/AndroidRuntime(5721): CheckJNI is OFF
05-30 15:30:12.164: WARN/dalvikvm(5721): JNI_CreateJavaVM failed
05-30 15:30:12.164: ERROR/AndroidRuntime(5721): JNI_CreateJavaVM failed
05-30 15:30:12.406: DEBUG/AndroidRuntime(5725): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
05-30 15:30:12.406: INFO/AndroidRuntime(5725): Heap size: -Xmx40m
05-30 15:30:12.406: DEBUG/AndroidRuntime(5725): CheckJNI is OFF
05-30 15:30:12.406: WARN/dalvikvm(5725): JNI_CreateJavaVM failed
05-30 15:30:12.406: ERROR/AndroidRuntime(5725): JNI_CreateJavaVM failed
When I look on my phone, it doesn't seem like it is actually uploading the apk, even though it says it succeeded.
What have I done wrong? I tried searching for solutions, but I haven't had much luck...
Did you enable USB Debug and install from Unknown Sources on your Android device?
Make sure you have the android:debuggable="true" in your AndroidManifest.xml
<application android:debuggable="true" android:name=".MyApp" android:icon="#drawable/icon" android:label="#string/app_name">
Related
I am using Eclipse (ADT), and created a Virtual Android(4.4.2) Nexus device.
I am able to start the Emulator, but when i do Run As > Android Application > Selecting Emulator as target - it fails.. i see following error in logcat (not sure what 10.1.1.100 IP and 9401 port is in the logs):
W/System.err(6599): org.apache.http.conn.ConnectTimeoutException: Connect to /10.1.1.100:9401 timed out
W/System.err(6599): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
W/System.err(6599): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:143)
W/System.err(6599): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
W/System.err(6599): at
...
...
D/BatteryService(1478): update start
E/yahoo.push.service(6542): yahoo.log.im: Thread-17_im KA exception: prod2.rest-core.msg.yahoo.com
E/yahoo.push.service(6542): java.net.UnknownHostException: prod2.rest-core.msg.yahoo.com
E/yahoo.push.service(6542): at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
E/yahoo.push.service(6542): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
E/yahoo.push.service(6542): at java.net.InetAddress.getAllByName(InetAddress.java:256)
If it matters - I am able to run the app successfully on a Physical Device.
[EDIT 1]
After clearing the c:\users\meuser\ .android directory:
I still see the following errors:
java.net.UnknownHostException: prod2.rest-core.msg.yahoo.com
....
E/dalvikvm(8793): Could not find class 'com.google.android.gms.deviceconnection.a.c',
referenced from method com.google.android.gms.deviceconnection.a.a.<init>
...
Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.util.e.a
And ultimately in the console:
Uploading my.apk onto device 'emulator-5554'
Installing my.apk...
Installation error: Unknown failure
Please check logcat output for more details.
Launch canceled!
This is not application issue, issue is with emulator
Try deleting .android folder from this path C:\Users\username\ and create new emulator in your eclipse and try. .android folder will be created again.
[2014-03-15 11:53:53 - yellow] ActivityManager: at dalvik.system.NativeStart.main(Native Method)
When I run the android application I get these all statements and then it stops. Emulator does not appear
I have tried to boot my emulator on three different platforms windows 7, ubuntu 12.04 and kubuntu 13.10(fresh install). However it always stops here with the logcat looping with the output below.
Could anyone help me figure this out. It is quite frustrating and I have lost close to a week of development.
D/AndroidRuntime( 3143): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime( 3143): CheckJNI is ON
E/dalvikvm( 3143): Can't create markStack
W/dalvikvm( 3143): CreateJavaVM failed: dvmGcStartup failed
E/AndroidRuntime( 3143): JNI_CreateJavaVM failed
I/Netd ( 3161): Netd 1.0 starting
W/InterfaceController( 3161): Warning (dlopen failed: library "/system/lib/libnetcmdiface.so" not found) while opening the net interface command library
D/AndroidRuntime( 3162):
I run into similar issue when I replaced libcrypto.so with my version. As restored /system/lib/libcrypto.so with original copy, things worked fine.
This happened unexpectedly on my Android 12 emulator. It would no longer boot up, and instead just get stuck on the black screen that has the word "android" in white letters, with a gray fade animation over the letters.
The logcat output would just have repeated displays of this every 10 seconds or so:
E/AndroidRuntime( 3143): JNI_CreateJavaVM failed
I couldn't find a way to fix it, so I just deleted the emulator and recreated it again, in Android Studio -> Tools -> Device Manager -> Create Device -> select a suitable screen size and a name -> Next -> press the tab "x86 Images" -> then select the Android 12 API 31 image that you have already downloaded.
I have an appWidget project I've been working on and noticed the Eclipse debugger does not seem to be working. I thought it might be borked, so I opened up another Android project and set a breakpoint and it worked fine. In my appWidget application however, the debugger will not work no matter where I set the breakpoint. I can set the breakpoint right on a Log statement, see the message print, but there is no interruption of execution.
I read something about having to install the 'Android sources' but it seems to me that if the debugger was missing something, it wouldn't work at all. The only clue I have is Logcat is printing "Debugger has detached" which offers little help. Other posts have suggested two Eclipse processes running (ps -ef shows only one), restarting adb (I've done adb kill-server; adb start-server) or that the process crashed, which Logcat does not show:
5486 AndroidRuntime D
5486 AndroidRuntime D >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
5486 AndroidRuntime I Heap size: -Xmx48m
5486 AndroidRuntime D CheckJNI is OFF
5486 dalvikvm D creating instr width table
5486 AndroidRuntime D Calling main entry com.android.commands.pm.Pm
5486 AndroidRuntime D Shutting down VM
5486 dalvikvm D GC_CONCURRENT freed 103K, 70% free 307K/1024K, external 0K/0K, paused 0ms+0ms
5486 dalvikvm D Debugger has detached; object registry had 1 entries
5486 AndroidRuntime I NOTE: attach of thread 'Binder Thread #1' failed
That's all Logcat says when I launch the application in debug mode. Any thoughts?
I tried to start the emulator for API level 8, and it just shows a black screen after the ANDROID intro flashes.
I get the following error messages in the DDMS:
01-01 17:56:51.315: E/System(120): Failure starting core service
01-01 17:56:51.315: E/System(120): java.lang.NullPointerException
01-01 17:56:51.344: E/SystemServer(120): Failure starting DevicePolicyService
01-01 17:56:51.344: E/SystemServer(120): java.lang.NullPointerException
01-01 17:56:51.685: E/SystemServer(120): Failure starting StatusBarService
01-01 17:56:51.685: E/SystemServer(120): java.lang.NullPointerException
01-01 17:56:51.735: E/SystemServer(120): Failure starting Input Manager Service
01-01 17:56:51.735: E/SystemServer(120): java.lang.NullPointerException
01-01 17:56:51.825: E/AndroidRuntime(120): *** FATAL EXCEPTION IN SYSTEM PROCESS: ConnectivityThread
01-01 17:56:51.825: E/AndroidRuntime(120): java.lang.NullPointerException
This is what I get in the console:
[2012-01-01 17:52:39 - find_an_event] ------------------------------
[2012-01-01 17:52:39 - find_an_event] Android Launch!
[2012-01-01 17:52:39 - find_an_event] adb is running normally.
[2012-01-01 17:52:39 - find_an_event] No Launcher activity found!
[2012-01-01 17:52:39 - find_an_event] The launch will only sync the application package on the device!
[2012-01-01 17:52:39 - find_an_event] Performing sync
[2012-01-01 17:52:39 - find_an_event] Automatic Target Mode: Preferred AVD 'avd' is not available. Launching new emulator.
[2012-01-01 17:52:39 - find_an_event] Launching a new emulator with Virtual Device 'avd'
[2012-01-01 17:53:02 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
[2012-01-01 17:53:02 - find_an_event] New emulator found: emulator-5554
[2012-01-01 17:53:02 - find_an_event] Waiting for HOME ('android.process.acore') to be launched...
[2012-01-01 18:11:31 - find_an_event] emulator-5554 disconnected! Cancelling 'sync'!
I think the reason for this could be a failure to sync additional jar files that I have added to the path of my source files (signpost for oAuth). Any ideas on how I can get the emulator to work ?
That means you have to close your already running Emulator, or really remove that emulator and create a new one. I don't know which tool do you use but maybe this link helps you:
Help