I am new in android and I am using genymotion emulator, but suddenly i an getting Late-Enabling Check problem in log cat and my app crashed. I try to run it on other emulator but still got the same message in log cat. I search many site but still cant get proper way to solve it. Any help is appreciated.
Here is my logcat:
08-22 02:24:26.639 1323-1323/? D/AndroidRuntime﹕ CheckJNI is OFF
08-22 02:24:29.803 1388-1388/? D/AndroidRuntime﹕ CheckJNI is OFF
08-22 02:24:30.343 1418-1418/? D/dalvikvm﹕ Late-enabling CheckJNI
I also faced this problem. Now I am resolved it.
Just go to Build tab on the top of andorid studio.
then click on Build apk. then run that apk in your device it works and not take much time.
Thank you
Related
After starting to use Android Studio 2.0, when I open old projects first time executing "Run App" crashes app on Android device but when I comment out every code on MainActivity I can "Run App" without problem, then I just uncomment lines I've already commented and "Run App" again and it works flawlessly too...
So I need to do that three step after a while but as I said I only comment and uncomment code blocks, so eventually code that did not work at first time starts to run and I looked for logs before and after doing these, and before commenting there is only two log lines and then no output occurs in logcat
09-29 23:42:15.248 8328-8328/sparkgoattendance.bsobe.com.attendance I/art: Late-enabling -Xcheck:jni
09-29 23:42:15.439 8328-8328/sparkgoattendance.bsobe.com.attendance W/System: ClassLoader referenced unknown path: /data/app/sparkgoattendance.bsobe.com.attendance-1/lib/arm
and I get these log lines in logcat at top after doing commenting uncommenting thing, so I don't know if it is related to my problem.
I suspect it is a problem about ART and wait for your help, thank you
In Run/Debug Configuration, there is Miscellaneous tab. There is an option called Skip installation if APK has not changed. Uncheck that option.
It sounds like APK already existed and for some reason,it just installed that APK from before. If you uncheck it, it will create a new one each time. This is why when you commented and uncommented the code, it worked. Because it created a new APK.
I am trying to run my app on a emulator. It used to work but now it does not load properly. The debug error I get is:
static = libcore.io.Posix
Exception = {android.system.ErrnoException#3564}
When I right click on the Exception line and Copy Value I get:
android.system.ErrnoException: stat failed: ENOENT (No such file or directory)
My app does not have any file io programed so the exception must relate to something the system requires.
Looking back in the LogCat I get a match for ENOENT, several lines before are:
com.google.process.location W/art? Suspending all threads took: 7.795ms
com.google.process.location I/art? Background partial concurrent mark sweep GC freed 2094(165KB) AllocSpace objects, 0(0B) LOS objects, 40% free, 3MB/5MB, paused 9.486ms total 274.854ms
com.google.process.location I/GCoreUlr? DispatchingService.onCreate()
com.google.process.location I/GCoreUlr? WorldUpdater received intent Intent { act=com.google.android.location.reporting.ACTION_UPDATE_WORLD cmp=com.google.android.gms/com.google.android.location.reporting.service.DispatchingService (has extras) } with receiverAction android.location.PROVIDERS_CHANGED
com.google.process.location E/copresGcore? Couldn't load settings: /data/data/com.google.android.gms/files/copresence_settings: open failed: ENOENT (No such file or directory)
I cannot see what file it cannot read/write to. I do not have any file IO programmed but I am using sqlite3, maybe to system cannot find the database file.
To get some relief from this error for a while I created a new project in Android Studio. Shut down AS and copied my source files into the new AS project. Then when I ran the new project, the error had gone. It came back after several hours of programing and editing.
I have looked for solutions on the internet for 2 days now without success. Any help would be appreciated.
Further details:
If I run (not debug) the app on the emulator or the device it works.
If I run/debug on the emulator or the device it crashes with the same libcore exception.
Part conclusion: it is something to do with debugging.
I thought I had come across a workaround:
I closed the existing AVD
I ran the AVD from the AS AVD manager
I re-installed the app: adb install -r C:\Users...\app-debug.apk
I ran the app from AS by pushing the debug button
This worked once then the libcore error appeared. This workaround is not good, even if it worked, as the edit run/cycle is too long.
I think the only way is to breakpoint the Google source to determine what it is excepting on. I spent much time searching the internet to find out how to do this without success. If anybody can point me to relevant articles I would be grateful.
I raised Android Open Source Project issue 126510. The comments by jcossi...#gmail.com gave the answer. I had turned on "Java Exception Breakpoints" with "Any exception" checked. This caused the problem when I restarted the project. I seems that applications may use exception handling for not just errors. So if you use "Any exception" be sure to remember to disable it again ASAP.
This answer helped me a lot, but I found that I had to uncheck some of the other fields on the right side of the box.
It seems that this should be a bug in Android Studio - using a provided feature disables the debugger, with no apparent reason or warning.
I am creating an app tht uses Google Maps API v2. It works fine, except for a little annoying this, when I use the setMyLocationEnabled(true); method, I get a ClassNotFoundException. I can just click "Resume" and the app continues. When running without debugger, there is nothing you can see happening.
This is what LogCat is saying:
09-23 22:39:31.645: I/dalvikvm(2067): Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lglm;'
09-23 22:39:31.645: W/dalvikvm(2067): Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
09-23 22:39:32.473: W/dalvikvm(2067): VFY: unable to resolve static field 4203 (CREATOR) in Lcom/google/android/gms/location/internal/ParcelableGeofence;
It looks like a missing class in the library, and if I jump into the library project, I indeed do not see that class.
Is there anything I can add / fix to make this exception go away?
I have seen that logcat error before and I noticed it is due to mismatch in my API key between debug and release mode. If you are using separate key store for debug, please make sure you have included both debug and release SHA1+package.name combos in the Google Dev Console.
I am working on app using of Aviary SDK. When I call loadAviaryActivityForImage(ImportDialog.imageFilePath) next error are shown:
06-21 11:53:53.421 4534-4549/com.bigblueclip.picstitch.debug:aviarycds E/AndroidRuntime﹕ FATAL EXCEPTION: IntentService[AviaryCdsService]
junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:48)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNotNull(Assert.java:218)
at junit.framework.Assert.assertNotNull(Assert.java:211)
at com.aviary.android.feather.cds.AviaryCdsService.checkProviderExists(AviaryCdsService.java:785)
at com.aviary.android.feather.cds.AviaryCdsService.onHandleIntent(AviaryCdsService.java:302)
at com.aviary.android.feather.cds.AviaryIntentService$ServiceHandler.handleMessage(AviaryIntentService.java:67)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
After that Aviary Activity run and give me valid image, so I don't know what's wrong. Does it mean that a problem is in Aviary SDK, not in my program?
There was a problem with gradle build. In detail, I use ".debug" prefix for build my app, but Aviary worked wrong with such configuration.
Please somebody explain me what this error means and how to avoid it.
After a while my app Force Closes because of this error:
09-28 12:53:45.746 I/dalvikvm(29489): Rejecting re-init on previously-failed class Lcom/bartat/android/ui/task/AsyncTaskExt; v=0x0
09-28 12:53:45.748 D/AndroidRuntime(29489): Shutting down VM
09-28 12:53:45.755 I/am_crash( 1146): [29489,com.bartat.android.secret,572996,java.lang.NoClassDefFoundError,com.bartat.android.ui.task.AsyncTaskExt,CommandsActivity.java,726]
09-28 12:53:45.755 I/am_finish_activity( 1146): [1079225264,123,com.bartat.android.secret/.CommandsActivity,crashed]
09-28 12:53:45.750 W/dalvikvm(29489): threadid=1: thread exiting with uncaught exception (group=0x40015560)
09-28 12:53:45.752 E/AndroidRuntime(29489): FATAL EXCEPTION: main
09-28 12:53:45.752 E/AndroidRuntime(29489): java.lang.NoClassDefFoundError: com.bartat.android.ui.task.AsyncTaskExt
This problem couldn't be solved by reinstalling the app.
If I rename the AsyncTaskExt to AsyncTaskExt2 for example then it works again for long. But after a few weeks/months it started to get this error again.
What does it mean? Why it is thrown and how to avoid it without renaming the class?
Please help me,
Tamás
Happens for me only if instant run is enabled.
This happens when a class couldn't be loaded for a variety of reasons. Unfortunately the new ART runtime doesn't log sufficient information as to the cause of this. If you can get hold of an older android device with Dalvik you'll see different logging, usually revealing the offence with more precision.
Last time I saw it live I had to deal with a JAR file that didn't actually include or list its dependencies, so adding the right dependent library to the gradle file solved it. The biggest issue is to figure which classes went missing - something dalvik logs/decompilation/documentation might be able to tell you.
There are many other reasons why classes can't be loaded in the entirety of the Java language so this specific cause might not apply universally.
I started having this problem after building another project with New Relic analytics enabled. Gradle daemon then cached the New Relic agent and it couldn't launch the other app.
What helped was
./gradlew --stop
you must add uses-library in your AndroidManifest.xml
Are you sure is this the first exception you are getting after running your application?
There may be some uncaught exceptions previously.