Android library from maven ExceptionInInitializerError (IntelliJ IDEA 12) - android

I try to use LanguageTool library http://www.languagetool.org/java-api/ in my android app,
try
{
JLanguageTool langTool = new JLanguageTool(new Polish());
}
catch (IOException e) {}
but I'm getting an error. I added maven library using Modules-->Dependencies-->Add-->library -->from maven.
Everything works, when I test it as console application.
11-07 19:54:35.071: ERROR/AndroidRuntime(2982): FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at com.example.orto_test.MyActivity.onCreate(MyActivity.java:35)
at android.app.Activity.performCreate(Activity.java:5206)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
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:1027)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.languagetool.JLanguageTool.getBuildDate(JLanguageTool.java:93)
at org.languagetool.JLanguageTool.<clinit>(JLanguageTool.java:77)
... 15 more
Thanks in advance!

According to http://languagetool-user-forum.2306527.n4.nabble.com/ClassDefNotFoundError-org-languagetool-language-AmericanEnglish-td4641443.html Languagtool 2.2 can be used on Android successfully. You might want to contact the languagetool-user-forum if you have trouble in getting things to work.

Related

Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: load_library[1098]: Library '/system/lib/libhoudini.so' not found

I updated Android Studio to 3.0.0 and Gradle to 3.0.0
After run my app on emulator Genymotion (API 16-19) crashed.
Error:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at android.support.v4.app.SupportActivity.<init>(SupportActivity.java:68)
at android.support.v4.app.BaseFragmentActivityGingerbread.<init>(BaseFragmentActivityGingerbread.java:37)
at android.support.v4.app.BaseFragmentActivityHoneycomb.<init>(BaseFragmentActivityHoneycomb.java:29)
at android.support.v4.app.BaseFragmentActivityJB.<init>(BaseFragmentActivityJB.java:30)
at android.support.v4.app.FragmentActivity.<init>(FragmentActivity.java:79)
at android.support.v7.app.AppCompatActivity.<init>(AppCompatActivity.java:61)
at com.myapp.start.BaseActivity.<init>(BaseActivity.java:37)
at com.myapp.start.StartActivity.<init>(StartActivity.java:40)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: load_library[1098]: Library '/system/lib/libhoudini.so' not found
Native methods in my app not using. What could be the problem?
Check your advanced profiling Run-->Edit Configurations.. --> Profiling Tab
--> Uncheck (Enable advanced profiling)

Plivo API endpoint Exception In Initializer error

03-24 10:51:22.425 20219-20219/com.mordred.call E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at com.plivo.endpoint.backend.PlivoAppCallback.<init>(PlivoAppCallback.java:114)
at com.plivo.endpoint.BackendListener.<init>(BackendListener.java:28)
at com.plivo.endpoint.Endpoint.initLib(Endpoint.java:150)
at com.plivo.endpoint.Endpoint.<init>(Endpoint.java:47)
at com.plivo.endpoint.Endpoint.newInstance(Endpoint.java:63)
at com.mordred.call.PstnActivity.<init>(PstnActivity.java:46)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
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:1036)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:803)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Native method not found: com.plivo.endpoint.backend.plivoJNI.swig_module_init:()V
at com.plivo.endpoint.backend.plivoJNI.swig_module_init(Native Method)
at com.plivo.endpoint.backend.plivoJNI.<clinit>(plivoJNI.java:108)
at com.plivo.endpoint.backend.PlivoAppCallback.<init>(PlivoAppCallback.java:114) 
at com.plivo.endpoint.BackendListener.<init>(BackendListener.java:28) 
at com.plivo.endpoint.Endpoint.initLib(Endpoint.java:150) 
at com.plivo.endpoint.Endpoint.<init>(Endpoint.java:47) 
at com.plivo.endpoint.Endpoint.newInstance(Endpoint.java:63) 
at com.mordred.call.PstnActivity.<init>(PstnActivity.java:46) 
at java.lang.Class.newInstanceImpl(Native Method) 
at java.lang.Class.newInstance(Class.java:1319) 
at android.app.Instrumentation.newActivity(Instrumentation.java:1068) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2025) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135) 
at android.app.ActivityThread.access$700(ActivityThread.java:140) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4921) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511)
I am using the plivo api, but when i open an activity, i get that error above, i know its coming from my endpoint instantiation, i.e i cannot do this
Endpoint endpoint = Endpoint.newInstance(true, this);
but i do not know what to do instead and i do not know what is causing the error
Plivo Sales Engineer here.
What's the processor architecture of the android phone that you're testing on? This error occurs when the libpjplivo.so file is incompatible with the processor architecture.
Please raise a ticket our support portal and we can help you debug this.

Crashlytics NoClassDefFoundError: com.crashlytics.android.answers.Answers

I get a project from other developer to fix minor issues in app, when I'm running my app on device I'm getting an error:
15142-15142/com.etripconcept E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.crashlytics.android.answers.Answers
at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:224)
at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:207)
at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:202)
at com.etripconcept.SplashScreenActivity.onCreate(SplashScreenActivity.java:16)
at android.app.Activity.performCreate(Activity.java:5163)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)
at android.app.ActivityThread.access$600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
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:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
I'm new in Android development, so it may be stupid question, but Google doesn't say anything about it. I use Android Studio 1.2.2 on Win 8.1

Phonegap Android facebook plugin crashes

I am getting the error below when I try to login through facebook plugin for Android.
The app basically crashes "stopped", Any ideas will be appreciated.
ERROR/AndroidRuntime(2008): FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to resume activity {xxx/com.facebook.LoginActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x7f060012
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2742)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2771)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2235)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5039)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x7f060012
at android.content.res.Resources.getText(Resources.java:230)
at android.content.res.Resources.getString(Resources.java:314)
at android.content.Context.getString(Context.java:327)
at com.facebook.widget.WebDialog.onCreate(WebDialog.java:189)
at android.app.Dialog.dispatchOnCreate(Dialog.java:355)
at android.app.Dialog.show(Dialog.java:260)
at com.facebook.AuthorizationClient$WebViewAuthHandler.tryAuthorize(AuthorizationClient.java:471)
at com.facebook.AuthorizationClient.tryCurrentHandler(AuthorizationClient.java:214)
at com.facebook.AuthorizationClient.tryNextHandler(AuthorizationClient.java:193)
at com.facebook.AuthorizationClient.authorize(AuthorizationClient.java:121)
at com.facebook.AuthorizationClient.startOrContinueAuth(AuthorizationClient.java:102)
at com.facebook.LoginActivity.onResume(LoginActivity.java:113)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1185)
at android.app.Activity.performResume(Activity.java:5182)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2732)
... 12 more
i kinda resolved it, i deleted the app_id string. turns out facebook plugin doesn't use that.

java.lang.NoClassDefFoundError for a class in the project

Android is throwing NoClassDefFoundError for ~1% of my users, no specific SDK version.
It's happening In my activity in the onCreate function when it try's to get an instance to a Singleton class i have in my project.
The singleton class it self doesn't reference any libs jar.
I tried on same devices it's heppening (e.g. SGH-T989) with no success.
Edit: adding the stack trace
at com.myapp.activities.RootActivity.getLoaderInstance(RootActivity.java:450)
at com.myapp.activities.RootActivity.doOnCreate(RootActivity.java:215)
at com.myapp.android.activities.AbstractActivity.onCreate(AbstractActivity.java:130)
at android.app.Activity.performCreate(Activity.java:5188)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4938)
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:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)

Categories

Resources