Getting ExceptionInInitializerError due to UnsatisfiedLinkError for Android NDK - android

When I use NDK + Android + JNI + OPENCV4ANDROID(2.4.2) I get the following error:
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1312]: 2586 cannot locate '_ZN2cv3Mat8copySizeERKS0_'...
I couldn't find anything useful when I searched.
Here's the logcat:
04-10 12:05:19.960: E/AndroidRuntime(11567): FATAL EXCEPTION: main
04-10 12:05:19.960: E/AndroidRuntime(11567): java.lang.ExceptionInInitializerError
04-10 12:05:19.960: E/AndroidRuntime(11567): at java.lang.Class.newInstanceImpl>(Native Method)
04-10 12:05:19.960: E/AndroidRuntime(11567): at java.lang.Class.newInstance(Class.java:1409)
04-10 12:05:19.960: E/AndroidRuntime(11567): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-10 12:05:19.960: E/AndroidRuntime(11567): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
04-10 12:05:19.960: E/AndroidRuntime(11567): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
04-10 12:05:19.960: E/AndroidRuntime(11567): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-10 12:05:19.960: E/AndroidRuntime(11567): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
04-10 12:05:19.960: E/AndroidRuntime(11567): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 12:05:19.960: E/AndroidRuntime(11567): at android.os.Looper.loop(Looper.java:130)
04-10 12:05:19.960: E/AndroidRuntime(11567): at android.app.ActivityThread.main(ActivityThread.java:3691)
04-10 12:05:19.960: E/AndroidRuntime(11567): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 12:05:19.960: E/AndroidRuntime(11567): at java.lang.reflect.Method.invoke(Method.java:507)
04-10 12:05:19.960: E/AndroidRuntime(11567): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
04-10 12:05:19.960: E/AndroidRuntime(11567): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
04-10 12:05:19.960: E/AndroidRuntime(11567): at dalvik.system.NativeStart.main(Native Method)
04-10 12:05:19.960: E/AndroidRuntime(11567): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1312]: 2586 cannot locate '_ZN2cv3Mat8copySizeERKS0_'...
04-10 12:05:19.960: E/AndroidRuntime(11567): at java.lang.Runtime.loadLibrary(Runtime.java:434)
04-10 12:05:19.960: E/AndroidRuntime(11567): at java.lang.System.loadLibrary(System.java:554)
04-10 12:05:19.960: E/AndroidRuntime(11567): at com.amani.main.chooser.<clinit>(chooser.java:139)
04-10 12:05:19.960: E/AndroidRuntime(11567): ... 15 more
Why am I getting an UnsatisfiedLinkError?

Related

Tesseract-OCR Cannot resolve corresponding JNI function

I have to use tesseract-ocr in Android Studio but I get an error.
04-10 22:04:56.885 17764-17764/com.example.samsung.bitirme_deneme3 V/Tesseract(native): Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClassInit
04-10 22:04:56.885 17764-17764/com.example.samsung.bitirme_deneme3 W/dalvikvm: Exception Ljava/lang/NoSuchFieldError; thrown while initializing Lcom/googlecode/tesseract/android/TessBaseAPI;
04-10 22:04:56.885 17764-17764/com.example.samsung.bitirme_deneme3 W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41b25a08)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: FATAL EXCEPTION: main
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: java.lang.ExceptionInInitializerError
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at com.example.samsung.bitirme_deneme3.MainActivity$1.onClick(MainActivity.java:555)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.view.View.performClick(View.java:4231)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.view.View$PerformClick.run(View.java:17537)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:725)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:92)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.os.Looper.loop(Looper.java:158)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5751)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:511)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: Caused by: java.lang.NoSuchFieldError: no field with name='mNativeData' signature='I' in class Lcom/googlecode/tesseract/android/TessBaseAPI;
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at com.googlecode.tesseract.android.TessBaseAPI.nativeClassInit(Native Method)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at com.googlecode.tesseract.android.TessBaseAPI.<clinit>(TessBaseAPI.java:47)
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at com.example.samsung.bitirme_deneme3.MainActivity$1.onClick(MainActivity.java:555) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.view.View.performClick(View.java:4231) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.view.View$PerformClick.run(View.java:17537) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:725) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:92) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.os.Looper.loop(Looper.java:158) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5751) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:511) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850) 
04-10 22:04:56.915 17764-17764/com.example.samsung.bitirme_deneme3 E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method) 
Line 47 in TessBaseAPI.java: nativeClassInit();
In TessBaseAPI.java class, When I came over nativeClassInit() function, an error seems: *
Cannot resolve corresponding JNI function
Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClassInit(),
Reports native method declarations in Java where no corresponding JNI
function is found in the project.
*
But the function "nativeClassInit()" is defined in tessbaseapi.cpp:
void
Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClassInit(JNIEnv*
env,
jclass clazz) {
field_mNativeData = env->GetFieldID(clazz, "mNativeData", "J");
method_onProgressValues = env->GetMethodID(clazz, "onProgressValues",
"(IIIIIIIII)V"); }
I found some solutions but the problem didn't fix. Thank you for your help.

My Launcher Based off androids launcher 3 ASOP doesn't open on samsung galaxy tab s

hey guys I'm working on a launcher that is based off Launcher 3 form AOSP it works perfectly on my nexus 7 tablet and all my android phones I just got the samsung galaxy tab s 8.4 and when I try to run it it crashes before it launchers heres what logcat says:
04-10 07:46:57.757: E/ActivityThread(23606): Failed to find provider info for com.android.launcher2.settings
04-10 07:46:57.897: E/AndroidRuntime(23606): FATAL EXCEPTION: main
04-10 07:46:57.897: E/AndroidRuntime(23606): Process: com.android.launcher3, PID: 23606
04-10 07:46:57.897: E/AndroidRuntime(23606): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.launcher3/com.android.launcher3.Launcher}: java.lang.RuntimeException: Binary XML file line #16: You must supply a layout_width attribute.
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2404)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.access$900(ActivityThread.java:172)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.os.Handler.dispatchMessage(Handler.java:102)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.os.Looper.loop(Looper.java:146)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.main(ActivityThread.java:5653)
04-10 07:46:57.897: E/AndroidRuntime(23606): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 07:46:57.897: E/AndroidRuntime(23606): at java.lang.reflect.Method.invoke(Method.java:515)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
04-10 07:46:57.897: E/AndroidRuntime(23606): at dalvik.system.NativeStart.main(Native Method)
04-10 07:46:57.897: E/AndroidRuntime(23606): Caused by: java.lang.RuntimeException: Binary XML file line #16: You must supply a layout_width attribute.
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:492)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:6203)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:6372)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.widget.FrameLayout$LayoutParams.<init>(FrameLayout.java:615)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:559)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:56)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.view.LayoutInflater.inflate(LayoutInflater.java:486)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.launcher3.Launcher.getQsbBar(Launcher.java:3427)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.launcher3.SearchDropTargetBar.setup(SearchDropTargetBar.java:72)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.launcher3.Launcher.setupViews(Launcher.java:1325)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.launcher3.Launcher.onCreate(Launcher.java:437)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.Activity.performCreate(Activity.java:5539)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2368)
04-10 07:46:57.897: E/AndroidRuntime(23606): ... 11 more
I know it says the error is at line 16 in the xml but what xml file theres 30 xml files so if you have any ideas please let me know
The device is a Samsung Galaxy Tab S running 4.4.2
any help would be awesome
Thanks in advance
I figured it out! the xml in question is located in: res/layout-sw720p/search_bar.xml
on line 16 you need to add the following code:
android:layout_width="match_parent"
android:layout_height="match_parent"
This fixed the crashing issue I hope this helps anyone else who is having this issue!

splitdexfile causes crash : Facebook SDK Parcelable encounteredClassNotFoundException reading a Serializable object

I tried to apply splitdexfile option to split Facebook's sdk as a separate dex file.
What I've done so far:
1) I've added below line to my dexguard-project.txt file:
-splitdexfile com.facebook.**
2) And below line to my project.properties file:
proguard.config=dexguard-project.txt
3) I've exported a signed apk with Export Optimized and Obfuscated Application Package... (DexGuard) option successfully.
4) I checked and confirmed that the apk is splitted to 2 dex files:
Then I installed the apk to a device, and tried facebook connect and got;
java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = o.?$?)
I couldn't find the o.?$?class at generated mapping.txt file.
DexGuard Version: 6.1
Facebook SDK Version: 3.22.0
Full Stacktrace:
04-10 10:12:55.727: E/ActivityThread(15362): Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
04-10 10:12:58.039: E/AndroidRuntime(15362): FATAL EXCEPTION: main
04-10 10:12:58.039: E/AndroidRuntime(15362): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.devrim/com.facebook.LoginActivity}: java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = o.?$?)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.access$600(ActivityThread.java:141)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Looper.loop(Looper.java:137)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.main(ActivityThread.java:5103)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.reflect.Method.invoke(Method.java:525)
04-10 10:12:58.039: E/AndroidRuntime(15362): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
04-10 10:12:58.039: E/AndroidRuntime(15362): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
04-10 10:12:58.039: E/AndroidRuntime(15362): at dalvik.system.NativeStart.main(Native Method)
04-10 10:12:58.039: E/AndroidRuntime(15362): Caused by: java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = o.?$?)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Parcel.readSerializable(Parcel.java:2177)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Parcel.readValue(Parcel.java:2022)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Parcel.readMapInternal(Parcel.java:2255)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Bundle.unparcel(Bundle.java:223)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Bundle.getSerializable(Bundle.java:1259)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.content.Intent.getSerializableExtra(Intent.java:4543)
04-10 10:12:58.039: E/AndroidRuntime(15362): at com.facebook.LoginActivity.onCreate(SourceFile:65)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.Activity.performCreate(Activity.java:5133)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
04-10 10:12:58.039: E/AndroidRuntime(15362): ... 11 more
04-10 10:12:58.039: E/AndroidRuntime(15362): Caused by: java.lang.ClassNotFoundException: o.?$?
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.Class.classForName(Native Method)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.Class.forName(Class.java:204)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:2304)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readNewClassDesc(ObjectInputStream.java:1663)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:683)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1806)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:787)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2006)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1963)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Parcel.readSerializable(Parcel.java:2171)
04-10 10:12:58.039: E/AndroidRuntime(15362): ... 20 more
04-10 10:12:58.039: E/AndroidRuntime(15362): Caused by: java.lang.NoClassDefFoundError: o/?$?
04-10 10:12:58.039: E/AndroidRuntime(15362): ... 30 more
04-10 10:12:58.039: E/AndroidRuntime(15362): Caused by: java.lang.ClassNotFoundException: Didn't find class "o.?$?" on path: DexPathList[[zip file "/data/app/com.devrim-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.devrim-1, /vendor/lib, /system/lib]]
04-10 10:12:58.039: E/AndroidRuntime(15362): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
04-10 10:12:58.039: E/AndroidRuntime(15362): ... 30 more
This is solved by adding below lines to dexguard-project.txt file:
-keep class * implements java.io.Serializable { *;}
-keepclassmembers class * implements java.io.Serializable { *;}

Android:TextToSpeech Not Working

Hi i create one application which is depend on TextToSpeech. When i am trying to run my
application It show the NullPointerException in Logcat. i search lot but didn't find helpful Answer.Here Check my Code on this link and Here is my logcat.
04-10 15:11:37.872: WARN/System.err(2798): java.lang.NullPointerException
04-10 15:11:37.872: WARN/System.err(2798): at com.example.examguide.ExamAppearingActivity.onCreate(ExamAppearingActivity.java:80)
04-10 15:11:37.872: WARN/System.err(2798): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-10 15:11:37.882: WARN/System.err(2798): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
04-10 15:11:37.882: WARN/System.err(2798): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-10 15:11:37.882: WARN/System.err(2798): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-10 15:11:37.882: WARN/System.err(2798): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-10 15:11:37.882: WARN/System.err(2798): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 15:11:37.882: WARN/System.err(2798): at android.os.Looper.loop(Looper.java:123)
04-10 15:11:37.882: WARN/System.err(2798): at android.app.ActivityThread.main(ActivityThread.java:3683)
04-10 15:11:37.882: WARN/System.err(2798): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 15:11:37.892: WARN/System.err(2798): at java.lang.reflect.Method.invoke(Method.java:507)
04-10 15:11:37.892: WARN/System.err(2798): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-10 15:11:37.892: WARN/System.err(2798): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-10 15:11:37.892: WARN/System.err(2798): at dalvik.system.NativeStart.main(Native Method)
Any help is Appreciated...
you have used this code.
final List<ObjectiveWiseQuestion> QuestionWiseProfile1= db.getOneQuestion(examId);
but you have not opened db before. So it is getting null.
ok write
tts = new TextToSpeech(this, this);
before you use tts object.
The tts object is not initialized. Hence you get a null pointer exception there.

I have an andengine program that works on one development machine but not another?

For reasons with which I won't bore you, I have to change development computers, and for the life of me I can't get my project to work on the second machine.
I have one library which is a .jar file which both machine have access to. But the program works fine on machine A but on machine B I get the errors below. At first I thought check the manifest, but, exactly the same project works fine on Machine A. So it must be something wrong with my development environment on B. Right? I can't think what it might be. I've got more apis on B than A.
04-10 20:21:50.826: W/dalvikvm(1487): Unable to resolve superclass of Lcom/webs/thefineanimationemporium/BoxingTmcthreeActivity; (117)
04-10 20:21:50.826: W/dalvikvm(1487): Link of class 'Lcom/webs/thefineanimationemporium/BoxingTmcthreeActivity;' failed
04-10 20:21:50.826: D/AndroidRuntime(1487): Shutting down VM
04-10 20:21:50.826: W/dalvikvm(1487): threadid=1: thread exiting with uncaught exception (group=0x2aac8578)
04-10 20:21:50.856: E/AndroidRuntime(1487): FATAL EXCEPTION: main
04-10 20:21:50.856: E/AndroidRuntime(1487): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.webs.thefineanimationemporium/com.webs.thefineanimationemporium.BoxingTmc threeActivity}: java.lang.ClassNotFoundException: com.webs.thefineanimationemporium.BoxingTmcthreeActivity in loader dalvik.system.PathClassLoader[/data/app/com.webs.thefineanimationemporium-1.apk]
04-10 20:21:50.856: E/AndroidRuntime(1487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1581)
04-10 20:21:50.856: E/AndroidRuntime(1487): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
04-10 20:21:50.856: E/AndroidRuntime(1487): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
04-10 20:21:50.856: E/AndroidRuntime(1487): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
04-10 20:21:50.856: E/AndroidRuntime(1487): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 20:21:50.856: E/AndroidRuntime(1487): at android.os.Looper.loop(Looper.java:138)
04-10 20:21:50.856: E/AndroidRuntime(1487): at android.app.ActivityThread.main(ActivityThread.java:3701)
04-10 20:21:50.856: E/AndroidRuntime(1487): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 20:21:50.856: E/AndroidRuntime(1487): at java.lang.reflect.Method.invoke(Method.java:507)
04-10 20:21:50.856: E/AndroidRuntime(1487): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
04-10 20:21:50.856: E/AndroidRuntime(1487): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
04-10 20:21:50.856: E/AndroidRuntime(1487): at dalvik.system.NativeStart.main(Native Method)
04-10 20:21:50.856: E/AndroidRuntime(1487): Caused by: java.lang.ClassNotFoundException: com.webs.thefineanimationemporium.BoxingTmcthreeActivity in loader dalvik.system.PathClassLoader[/data/app/com.webs.thefineanimationemporium-1.apk]
04-10 20:21:50.856: E/AndroidRuntime(1487): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
04-10 20:21:50.856: E/AndroidRuntime(1487): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
04-10 20:21:50.856: E/AndroidRuntime(1487): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-10 20:21:50.856: E/AndroidRuntime(1487): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-10 20:21:50.856: E/AndroidRuntime(1487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
04-10 20:21:50.856: E/AndroidRuntime(1487): ... 11 more
04-10 20:21:55.216: I/Process(1487): Sending signal. PID: 1487 SIG: 9
Sounds like a dodgy install on the second device to me, since one of the classes being called cant be found. Have you tried reinstalling?
edit: Sorry for sounding like someone from a tech support line...

Categories

Resources