I downloaded UnboundID LDAP SDK and imported it to my Eclipse Android project. It make use of existing LDAPClient supplied with the SDK.
Build was successful. However, when I attempt to launch the application, it gives below run-time error and application would not launch.
I am new to Android and Eclipse. Hence, any help or tips shall be appreciated.
If there are any details required, please let me know. I can add it.
11-20 19:36:38.395: I/dalvikvm(636): Could not find method com.unboundid.ldap.sdk.Filter.create, referenced from method people.finder.PeopleFinder.goSearch
11-20 19:36:38.395: W/dalvikvm(636): VFY: unable to resolve static method 3247: Lcom/unboundid/ldap/sdk/Filter;.create (Ljava/lang/String;)Lcom/unboundid/ldap/sdk/Filter;
11-20 19:36:38.395: D/dalvikvm(636): VFY: replacing opcode 0x71 at 0x00d4
11-20 19:36:38.395: W/dalvikvm(636): VFY: unable to resolve exception class 451 (Lcom/unboundid/ldap/sdk/LDAPException;)
11-20 19:36:38.395: W/dalvikvm(636): VFY: unable to find exception handler at addr 0x113
11-20 19:36:38.405: W/dalvikvm(636): VFY: rejected people/finder/PeopleFinder;.goSearch (Landroid/view/View;)V
11-20 19:36:38.405: W/dalvikvm(636): VFY: rejecting opcode 0x0d at 0x0113
11-20 19:36:38.405: W/dalvikvm(636): VFY: rejected /people/finder/PeopleFinder;.goSearch (Landroid/view/View;)V
11-20 19:36:38.405: W/dalvikvm(636): Verifier rejected class people/finder/PeopleFinder;
11-20 19:36:38.405: W/dalvikvm(636): Class init failed in newInstance call (people/finder/PeopleFinder;)
11-20 19:36:38.405: D/AndroidRuntime(636): Shutting down VM
11-20 19:36:38.405: W/dalvikvm(636): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
11-20 19:36:38.415: E/AndroidRuntime(636): FATAL EXCEPTION: main
11-20 19:36:38.415: E/AndroidRuntime(636): java.lang.VerifyError: people/finder/PeopleFinder
11-20 19:36:38.415: E/AndroidRuntime(636): at java.lang.Class.newInstanceImpl(Native Method)
11-20 19:36:38.415: E/AndroidRuntime(636): at java.lang.Class.newInstance(Class.java:1319)
11-20 19:36:38.415: E/AndroidRuntime(636): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
11-20 19:36:38.415: E/AndroidRuntime(636): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
11-20 19:36:38.415: E/AndroidRuntime(636): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
11-20 19:36:38.415: E/AndroidRuntime(636): at android.app.ActivityThread.access$600(ActivityThread.java:130)
11-20 19:36:38.415: E/AndroidRuntime(636): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
11-20 19:36:38.415: E/AndroidRuntime(636): at android.os.Handler.dispatchMessage(Handler.java:99)
11-20 19:36:38.415: E/AndroidRuntime(636): at android.os.Looper.loop(Looper.java:137)
11-20 19:36:38.415: E/AndroidRuntime(636): at android.app.ActivityThread.main(ActivityThread.java:4745)
11-20 19:36:38.415: E/AndroidRuntime(636): at java.lang.reflect.Method.invokeNative(Native Method)
11-20 19:36:38.415: E/AndroidRuntime(636): at java.lang.reflect.Method.invoke(Method.java:511)
11-20 19:36:38.415: E/AndroidRuntime(636): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-20 19:36:38.415: E/AndroidRuntime(636): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-20 19:36:38.415: E/AndroidRuntime(636): at dalvik.system.NativeStart.main(Native Method)
You need to make sure that the jar is exported when building .apk file.
In project properties, go to Java Build Path > Order and Export : fill the checkbox corresponding to the LDAP sdk
Related
I have a lib.apk that is sent by server and received by my application and then saved on sdcard.now I want run activities of inside my library but when I try do it, it gives me error do you define activity in manifest. I added activity tag to manifest of my lib but it still didn't work. Can anyone give any idea?
manifest file of my lib
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.lib.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>
logcat error
11-20 05:16:49.918: W/System.err(6721): java.lang.reflect.InvocationTargetException
11-20 05:16:49.938: W/System.err(6721): at java.lang.reflect.Method.invokeNative(Native Method)
11-20 05:16:49.948: W/System.err(6721): at java.lang.reflect.Method.invoke(Method.java:511)
11-20 05:16:49.948: W/System.err(6721): at com.example.myapp2.MainActivity.onCreate(MainActivity.java:29)
11-20 05:16:49.948: W/System.err(6721): at android.app.Activity.performCreate(Activity.java:5104)
11-20 05:16:49.948: W/System.err(6721): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
11-20 05:16:49.948: W/System.err(6721): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
11-20 05:16:49.958: W/System.err(6721): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
11-20 05:16:49.958: W/System.err(6721): at android.app.ActivityThread.access$600(ActivityThread.java:141)
11-20 05:16:49.958: W/System.err(6721): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
11-20 05:16:49.958: W/System.err(6721): at android.os.Handler.dispatchMessage(Handler.java:99)
11-20 05:16:49.969: W/System.err(6721): at android.os.Looper.loop(Looper.java:137)
11-20 05:16:49.969: W/System.err(6721): at android.app.ActivityThread.main(ActivityThread.java:5041)
11-20 05:16:49.969: W/System.err(6721): at java.lang.reflect.Method.invokeNative(Native Method)
11-20 05:16:49.969: W/System.err(6721): at java.lang.reflect.Method.invoke(Method.java:511)
11-20 05:16:49.969: W/System.err(6721): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
11-20 05:16:49.978: W/System.err(6721): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
11-20 05:16:49.978: W/System.err(6721): at dalvik.system.NativeStart.main(Native Method)
11-20 05:16:49.978: W/System.err(6721): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.myapp2/com.example.lib.MainActivity}; have you declared this activity in your AndroidManifest.xml?
11-20 05:16:49.988: W/System.err(6721): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1618)
11-20 05:16:50.000: W/System.err(6721): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417)
11-20 05:16:50.008: W/System.err(6721): at android.app.Activity.startActivityForResult(Activity.java:3370)
11-20 05:16:50.008: W/System.err(6721): at android.app.Activity.startActivityForResult(Activity.java:3331)
11-20 05:16:50.008: W/System.err(6721): at android.app.Activity.startActivity(Activity.java:3566)
11-20 05:16:50.019: W/System.err(6721): at android.app.Activity.startActivity(Activity.java:3534)
11-20 05:16:50.028: W/System.err(6721): at com.example.lib.Main.onCreate(Main.java:32)
You cannot run activties that have not been installed on the phone. Just having an APK on the SD-card is not enough. This APK will need to be installed on the device.
I am following this tutorial and I can make it work just fine, but when I try to update the UI to fit the new Holo.Light in android 4.2 the app crashes at launch, and I don't know why.
I have been searching for a way to update the UI but I could not get it to work.
I wonder if anybody could help me? tell me how? Give me a link that you know would work?
or even do it yourself?
i get this error log:
11-20 09:50:39.523: I/dalvikvm(1460): threadid=3: reacting to signal 3
11-20 09:50:39.682: I/dalvikvm(1460): Wrote stack traces to '/data/anr/traces.txt'
11-20 09:50:39.892: I/dalvikvm(1460): threadid=3: reacting to signal 3
11-20 09:50:40.003: I/dalvikvm(1460): Wrote stack traces to '/data/anr/traces.txt'
11-20 09:50:40.102: D/AndroidRuntime(1460): Shutting down VM
11-20 09:50:40.102: W/dalvikvm(1460): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
11-20 09:50:40.132: E/AndroidRuntime(1460): FATAL EXCEPTION: main
11-20 09:50:40.132: E/AndroidRuntime(1460): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidhive.jsonparsing/com.androidhive.jsonparsing.AndroidJSONParsingActivity}: android.os.NetworkOnMainThreadException
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.app.ActivityThread.access$600(ActivityThread.java:123)
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.os.Handler.dispatchMessage(Handler.java:99)
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.os.Looper.loop(Looper.java:137)
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.app.ActivityThread.main(ActivityThread.java:4424)
11-20 09:50:40.132: E/AndroidRuntime(1460): at java.lang.reflect.Method.invokeNative(Native Method)
11-20 09:50:40.132: E/AndroidRuntime(1460): at java.lang.reflect.Method.invoke(Method.java:511)
11-20 09:50:40.132: E/AndroidRuntime(1460): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-20 09:50:40.132: E/AndroidRuntime(1460): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-20 09:50:40.132: E/AndroidRuntime(1460): at dalvik.system.NativeStart.main(Native Method)
11-20 09:50:40.132: E/AndroidRuntime(1460): Caused by: android.os.NetworkOnMainThreadException
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
11-20 09:50:40.132: E/AndroidRuntime(1460): at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
11-20 09:50:40.132: E/AndroidRuntime(1460): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
11-20 09:50:40.132: E/AndroidRuntime(1460): at java.net.InetAddress.getAllByName(InetAddress.java:220)
11-20 09:50:40.132: E/AndroidRuntime(1460): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
11-20 09:50:40.132: E/AndroidRuntime(1460): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
11-20 09:50:40.132: E/AndroidRuntime(1460): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
11-20 09:50:40.132: E/AndroidRuntime(1460): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
11-20 09:50:40.132: E/AndroidRuntime(1460): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
11-20 09:50:40.132: E/AndroidRuntime(1460): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
11-20 09:50:40.132: E/AndroidRuntime(1460): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
11-20 09:50:40.132: E/AndroidRuntime(1460): at com.androidhive.jsonparsing.JSONParser.getJSONFromUrl(JSONParser.java:38)
11-20 09:50:40.132: E/AndroidRuntime(1460): at com.androidhive.jsonparsing.AndroidJSONParsingActivity.onCreate(AndroidJSONParsingActivity.java:53)
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.app.Activity.performCreate(Activity.java:4465)
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
11-20 09:50:40.132: E/AndroidRuntime(1460): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
11-20 09:50:40.132: E/AndroidRuntime(1460): ... 11 more
11-20 09:50:40.392: I/dalvikvm(1460): threadid=3: reacting to signal 3
11-20 09:50:40.412: I/dalvikvm(1460): Wrote stack traces to '/data/anr/traces.txt'
11-20 09:50:40.791: I/dalvikvm(1460): threadid=3: reacting to signal 3
11-20 09:50:40.962: I/dalvikvm(1460): Wrote stack traces to '/data/anr/traces.txt'
You are making a network call on the main thread. This is not allowed on Android 4.2, and is a really bad idea on earlier versions which do permit this. I have blogged about various mechanisms for moving network and other heavy calls off the main thread at http://blog.stylingandroid.com/archives/833.
Without seeing your code, I cannot begin to suggest which approach is the right one for you to use, but hopefully the information in my articles will help you in deciding upon the correct approach.
There are two Solution of this Problem.
1) Don't write network call in Main UIThread, Use Async Task for that.
2) Write below code into your MainActivity file after setContentView(R.layout.activity_main);
if (android.os.Build.VERSION.SDK_INT > 9) {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
And below import statement into your java file.
import android.os.StrictMode;
and see below link for more information.
Twitter connect error
I want my Android app to behave as a client and listen on a particular port. None of the code I've tried works. I tried this tutorial to create a small chat app. The server side works fine, but the app crashes on my device. I have both my phone and server comp on VPN.
logcat text returned:
11-20 12:39:12.789: W/dalvikvm(12045): threadid=1: thread exiting with uncaught exception (group=0x4017c560)
11-20 12:39:12.799: E/AndroidRuntime(12045): FATAL EXCEPTION: main
11-20 12:39:12.799: E/AndroidRuntime(12045): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android_port/com.example.android_port.MainActivity}: java.lang.ClassNotFoundException: com.example.android_port.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.android_port-1.apk]
11-20 12:39:12.799: E/AndroidRuntime(12045): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
11-20 12:39:12.799: E/AndroidRuntime(12045): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
11-20 12:39:12.799: E/AndroidRuntime(12045): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
11-20 12:39:12.799: E/AndroidRuntime(12045): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
11-20 12:39:12.799: E/AndroidRuntime(12045): at android.os.Handler.dispatchMessage(Handler.java:99)
11-20 12:39:12.799: E/AndroidRuntime(12045): at android.os.Looper.loop(Looper.java:130)
11-20 12:39:12.799: E/AndroidRuntime(12045): at android.app.ActivityThread.main(ActivityThread.java:3687)
11-20 12:39:12.799: E/AndroidRuntime(12045): at java.lang.reflect.Method.invokeNative(Native Method)
11-20 12:39:12.799: E/AndroidRuntime(12045): at java.lang.reflect.Method.invoke(Method.java:507)
11-20 12:39:12.799: E/AndroidRuntime(12045): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
11-20 12:39:12.799: E/AndroidRuntime(12045): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
11-20 12:39:12.799: E/AndroidRuntime(12045): at dalvik.system.NativeStart.main(Native Method)
11-20 12:39:12.799: E/AndroidRuntime(12045): Caused by: java.lang.ClassNotFoundException: com.example.android_port.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.android_port-1.apk]
11-20 12:39:12.799: E/AndroidRuntime(12045): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
11-20 12:39:12.799: E/AndroidRuntime(12045): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
11-20 12:39:12.799: E/AndroidRuntime(12045): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
11-20 12:39:12.799: E/AndroidRuntime(12045): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
11-20 12:39:12.799: E/AndroidRuntime(12045): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
11-20 12:39:12.799: E/AndroidRuntime(12045): ... 11 more
Recently, I encountered a problem,My android app always stopped unexpectedly and some errors are printed on the log.In fact, I do not know how to debug my program base on logcat which everybody I asked for help wanted.please help me!
Here's my log.
04-22 11:57:20.653: W/dalvikvm(346): VFY: unable to resolve new-instance 41 (Loauth/signpost/commonshttp/CommonsHttpOAuthConsumer;) in LOAuth4Sina/com/AuthActivity;
04-22 11:57:20.653: D/dalvikvm(346): VFY: replacing opcode 0x22 at 0x000f
04-22 11:57:20.673: D/dalvikvm(346): VFY: dead code 0x0011-0039 in LOAuth4Sina/com/AuthActivity;.onCreate (Landroid/os/Bundle;)V
04-22 11:57:20.673: I/dalvikvm(346): Could not find method oauth.signpost.OAuthProvider.setOAuth10a, referenced from method OAuth4Sina.com.AuthActivity.onNewIntent
04-22 11:57:20.693: W/dalvikvm(346): VFY: unable to resolve interface method 41: Loauth/signpost/OAuthProvider;.setOAuth10a (Z)V
04-22 11:57:20.693: D/dalvikvm(346): VFY: replacing opcode 0x72 at 0x0010
04-22 11:57:20.733: W/dalvikvm(346): VFY: unable to resolve exception class 44 (Loauth/signpost/exception/OAuthMessageSignerException;)
04-22 11:57:20.733: W/dalvikvm(346): VFY: unable to find exception handler at addr 0x68
04-22 11:57:20.733: W/dalvikvm(346): VFY: rejected LOAuth4Sina/com/AuthActivity;.onNewIntent (Landroid/content/Intent;)V
04-22 11:57:20.766: W/dalvikvm(346): VFY: rejecting opcode 0x0d at 0x0068
04-22 11:57:20.766: W/dalvikvm(346): VFY: rejected LOAuth4Sina/com/AuthActivity;.onNewIntent (Landroid/content/Intent;)V
04-22 11:57:20.766: W/dalvikvm(346): Verifier rejected class LOAuth4Sina/com/AuthActivity;
04-22 11:57:20.766: W/dalvikvm(346): Class init failed in newInstance call (LOAuth4Sina/com/AuthActivity;)
04-22 11:57:20.785: D/AndroidRuntime(346): Shutting down VM
04-22 11:57:20.785: W/dalvikvm(346): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
04-22 11:57:20.812: E/AndroidRuntime(346): FATAL EXCEPTION: main
04-22 11:57:20.812: E/AndroidRuntime(346): java.lang.VerifyError: OAuth4Sina.com.AuthActivity
04-22 11:57:20.812: E/AndroidRuntime(346): at java.lang.Class.newInstanceImpl(Native Method)
04-22 11:57:20.812: E/AndroidRuntime(346): at java.lang.Class.newInstance(Class.java:1429)
04-22 11:57:20.812: E/AndroidRuntime(346): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-22 11:57:20.812: E/AndroidRuntime(346): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
04-22 11:57:20.812: E/AndroidRuntime(346): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-22 11:57:20.812: E/AndroidRuntime(346): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-22 11:57:20.812: E/AndroidRuntime(346): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-22 11:57:20.812: E/AndroidRuntime(346): at android.os.Handler.dispatchMessage(Handler.java:99)
04-22 11:57:20.812: E/AndroidRuntime(346): at android.os.Looper.loop(Looper.java:123)
04-22 11:57:20.812: E/AndroidRuntime(346): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-22 11:57:20.812: E/AndroidRuntime(346): at java.lang.reflect.Method.invokeNative(Native Method)
04-22 11:57:20.812: E/AndroidRuntime(346): at java.lang.reflect.Method.invoke(Method.java:521)
04-22 11:57:20.812: E/AndroidRuntime(346): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-22 11:57:20.812: E/AndroidRuntime(346): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-22 11:57:20.812: E/AndroidRuntime(346): at dalvik.system.NativeStart.main(Native Method)
I'm currently working on a Wrapper for Android, Which wraps an android
apk with some DRM related stuff.. which are by the way Android
activities..
The activities i had created worked perfectly when I tested them in an
Emulator as well as on a Device.
I tried integrating it with an Application from our org's apps
store... Steps below
Extracted the apk with apktool
* Extracted class files with dex2jar
* added the class files to an Eclipse android project as classes
folder
* Added the activity def from the original app manifest to my manifest
* Compiled and Launched the app from eclipse*
Note : The activities I had created are working very fine.. They load
complete their work and try to launch the game application i was using
to Test Integration.
here's when I come across the VerifyError
11-20 22:44:07.670: W/System.err(281): at
***java.lang.Thread.run(Thread.java:1096)
11-20 22:44:08.050: W/dalvikvm(281): VFY: register1 v0 type 12, wanted
10
11-20 22:44:08.050: W/dalvikvm(281): VFY: register1 v1 type 12, wanted
10
11-20 22:44:08.050: W/dalvikvm(281): VFY: rejecting opcode 0x71 at
0x0016
11-20 22:44:08.050: W/dalvikvm(281): VFY: rejected Lao;.a (Ldh;)I
11-20 22:44:08.050: W/dalvikvm(281): Verifier rejected class Lao;***
11-20 22:44:08.060: D/AndroidRuntime(281): Shutting down VM
11-20 22:44:08.060: W/dalvikvm(281): threadid=1: thread exiting with
uncaught exception (group=0x4001d800)
11-20 22:44:08.170: E/AndroidRuntime(281): FATAL EXCEPTION: main
11-20 22:44:08.170: E/AndroidRuntime(281): java.lang.VerifyError: ao
11-20 22:44:08.170: E/AndroidRuntime(281): at
ca.jamdat.flight.trivialpursuit_hvga_eu.FlAndroidApp.onCreate(Unknown
Source)
11-20 22:44:08.170: E/AndroidRuntime(281): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
11-20 22:44:08.170: E/AndroidRuntime(281): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2627)
11-20 22:44:08.170: E/AndroidRuntime(281): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2679)
11-20 22:44:08.170: E/AndroidRuntime(281): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-20 22:44:08.170: E/AndroidRuntime(281): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-20 22:44:08.170: E/AndroidRuntime(281): at
android.os.Handler.dispatchMessage(Handler.java:99)
11-20 22:44:08.170: E/AndroidRuntime(281): at
android.os.Looper.loop(Looper.java:123)
11-20 22:44:08.170: E/AndroidRuntime(281): at
android.app.ActivityThread.main(ActivityThread.java:4627)
11-20 22:44:08.170: E/AndroidRuntime(281): at
java.lang.reflect.Method.invokeNative(Native Method)
11-20 22:44:08.170: E/AndroidRuntime(281): at
java.lang.reflect.Method.invoke(Method.java:521)
11-20 22:44:08.170: E/AndroidRuntime(281): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-20 22:44:08.170: E/AndroidRuntime(281): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-20 22:44:08.170: E/AndroidRuntime(281): at
dalvik.system.NativeStart.main(Native Method)
And now I have worked around the problem..
The problem probably is dex2jar tool i used to extract the .class files from the apk (classes probably being corrupt).
I created smali files of my implementation and pasted them into smali folder of the actual application extracted using the apktool and loaded the classes using reflecion rather than directly importing them into my compiled bytecode.
Offfffffff resolved... :)