Any idea why I get this exceptions. Its supposed to be very straight forward and simple. It compiles without any errors or warnings. At run time it throws exception.
Instrumentation im = new Instrumentation();
UiAutomation myVar = im.getUiAutomation();
myVar.injectInputEvent(evntDown,false);
Here's the exception.
01-26 11:59:17.344 17742-17742/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NoSuchMethodError: android.app.Instrumentation.getUiAutomation
at com.infostretch.automateme.MainActivity$1.onClick(MainActivity.java:51)
at android.view.View.performClick(View.java:4202)
at android.view.View$PerformClick.run(View.java:17340)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5039)
at java.lang.reflect.Method.invokeNative(Native Method)
UIAutomation was included in API 18. NoSuchMethod Exception occurs when you try to access/use a class/method that is not supported on OS/API version you are currently running the app on.
Related
The class WebViewClassic throws a NullPointerException when it invokes addJavascriptInterface method on Android 4.3. I don't find the NullPointerException from the system source of android 4.3. addJavascriptInterface method
I think it should be a system bug. Help me please. thanks.
java.lang.NullPointerException
at android.webkit.WebViewClassic.addJavascriptInterface(WebViewClassic.java:4314)
at android.webkit.WebView.addJavascriptInterface(WebView.java:1533)
at com.browser.webview_checkmode.BrowserWebViewFactory$1.run(BrowserWebViewFactory.java:71)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5166)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
I just finished integrating Firebase real time data base and Authentication into my Android Studio application. It ran successfully two or three times on my Google Nexus 7 genymotion emulator that has google play services on it. Then I tried launching it again and I started getting the below error:
06-25 16:50:46.994 7699-7699/
com.careersvirtualsolutions.uprate E/AndroidRuntime:
FATAL EXCEPTION: main
java.lang.NullPointerException
at com.google.firebase.auth.FirebaseAuth$1.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
I think this has something to do with the Firebase Authentication SDK but I am not sure.
Do you know what this is caused by? How can I solve it?
I actually figured it out, the problem was with the AuthStateListener.
So if you're having a similar issue, try testing your project with the AuthStateListener commented out and see if it launches without crashing. If it does you can then figure out how to replace the existing listener.
Hope this helps in some way!
Running this in my android device gives me these errors.
Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lffvideolivewallpaper/frankandrobot/com/NativeCalls;
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x40ed42a0)
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at ffvideolivewallpaper.frankandrobot.com.VideoLiveWallpaper.onSharedPreferenceChanged(VideoLiveWallpaper.java:144)
at ffvideolivewallpaper.frankandrobot.com.VideoLiveWallpaper.onCreate(VideoLiveWallpaper.java:78)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2404)
at android.app.ActivityThread.access$1600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1309)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load avcore: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at ffvideolivewallpaper.frankandrobot.com.NativeCalls.(NativeCalls.java:42)
... 13 more
I think these errors are related to Android NDK. Can anyone guide me on this, keeping in mind that I have no prior knowledge of Android NDK and how it works.
This may happen if we install the app on a device where the previous version was already installed we always get this kind of error:
Just look at this similar problem : https://groups.google.com/d/topic/android-ndk/YmKly4zEMQ0/discussion
I found the reason why I was getting this error, because I did not build the native libraries. I used ndk-build and the errors got resolved.
I hava a project from my friends,
When I run the project in the Eclipse ,will have an error printed in the LogCat
Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/ansca/corona/JavaToNativeShim;
Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcom/ansca/corona/CoronaEnvironment;
threadid=1: thread exiting with uncaught exception (group=0x41b2f498)
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at com.uangel.corona.CoronaApplication.onCreate(CoronaApplication.java:16)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4281)
at android.app.ActivityThread.access$1300(ActivityThread.java:136)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4875)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:804)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:571)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ExceptionInInitializerError
at com.ansca.corona.CoronaEnvironment.setLuaErrorHandler(CoronaEnvironment.java:373)
at com.ansca.corona.CoronaEnvironment.<clinit>(CoronaEnvironment.java:41)
... 13 more
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load lua: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at com.ansca.corona.JavaToNativeShim.<clinit>(JavaToNativeShim.java:94)
... 15 more
I can't make it. Please help me.
I recommend seeing if you can build one of the corona sample projects first to see if you can build those.
Also some helpful information you can give us:
What version of corona are you using?
There is an exceptions, which I got in Android on drag.
Google doesnt know about this exception.
Question:
Any Idea, what to override to catch this exception? Something seems to hppen inside of the system, because all the listed classes are frameworks native classes.
Window Session Crash
java.lang.IllegalStateException: reportDropResult() by non-recipient
at com.android.server.wm.Session.reportDropResult(Session.java:307)
at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:369)
at com.android.server.wm.Session.onTransact(Session.java:111)
at android.os.Binder.execTransact(Binder.java:320)
at dalvik.system.NativeStart.run(Native Method)
FATAL EXCEPTION: main
java.lang.IllegalStateException: reportDropResult() by non-recipient
at android.os.Parcel.readException(Parcel.java:1329)
at android.os.Parcel.readException(Parcel.java:1275)
at android.view.IWindowSession$Stub$Proxy.reportDropResult(IWindowSession.java:900)
at android.view.ViewRoot.handleDragEvent(ViewRoot.java:3015)
at android.view.ViewRoot.handleMessage(ViewRoot.java:2164)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4025)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
There is an exceptions, which I got in Android on drag. Google doesnt know about this exception.
Since I can't find a reportDropResult() in the Android 2.3 source, I am guessing that this is from the new drag-and-drop framework introduced with Honeycomb.
Any Idea, what to override to catch this exception?
You can't override anything to catch that exception. To catch unhandled exceptions, use Thread and setDefaultUncaughtExceptionHandler().