ICS class not found Exception - android

I had updated my android sdk to ics(4.1) as i updated all my old projects which were developped in froyo(2.3) giving me error Like
08-16 19:16:32.284: E/AndroidRuntime(593): FATAL EXCEPTION: main
08-16 19:16:32.284: E/AndroidRuntime(593): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.abc.def/com.abc.def.defMain}: java.lang.ClassNotFoundException: com.abc.def.defMain in loader dalvik.system.PathClassLoader[/data/app/com.abc.def-1.apk]
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.os.Handler.dispatchMessage(Handler.java:99)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.os.Looper.loop(Looper.java:123)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-16 19:16:32.284: E/AndroidRuntime(593): at java.lang.reflect.Method.invokeNative(Native Method)
08-16 19:16:32.284: E/AndroidRuntime(593): at java.lang.reflect.Method.invoke(Method.java:521)
08-16 19:16:32.284: E/AndroidRuntime(593): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-16 19:16:32.284: E/AndroidRuntime(593): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-16 19:16:32.284: E/AndroidRuntime(593): at dalvik.system.NativeStart.main(Native Method)
08-16 19:16:32.284: E/AndroidRuntime(593): Caused by: java.lang.ClassNotFoundException: com.abc.def.defMain in loader dalvik.system.PathClassLoader[/data/app/com.abc.def-1.apk]
08-16 19:16:32.284: E/AndroidRuntime(593): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
08-16 19:16:32.284: E/AndroidRuntime(593): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
08-16 19:16:32.284: E/AndroidRuntime(593): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
08-16 19:16:32.284: E/AndroidRuntime(593): ... 11 more
before updating sdk all of these were running very without any error please help

I got the solution for this Exception this problem was occuring because i was using external libraries in my project and reffering them in build path but in ics the libraries should be contained in libs directory of project so as i copied the libraries in libs problem get solved

Related

NullPointerException during application run

When running my application it is stooped with null pointer exception.
problem occurring in 4th line
1. Bundle arguments;
2.arguments = getArguments();
3.String viewType=arguments.getString("viewType");
4.if(viewType.equals("weekly"))
{
......
}
Is there any solution? please reply.
08-16 11:31:03.146: E/AndroidRuntime(2675): FATAL EXCEPTION: main
08-16 11:31:03.146: E/AndroidRuntime(2675): java.lang.NullPointerException
08-16 11:31:03.146: E/AndroidRuntime(2675): at com.nv.netmdapp1.ScheduleCreateDialog$1.onClick(ScheduleCreateDialog.java:188)
08-16 11:31:03.146: E/AndroidRuntime(2675): at com.nv.netmdapp1.customViews.CustomAlertDialog$Builder$1.onClick(CustomAlertDialog.java:110)
08-16 11:31:03.146: E/AndroidRuntime(2675): at android.view.View.performClick(View.java:3511)
08-16 11:31:03.146: E/AndroidRuntime(2675): at android.view.View$PerformClick.run(View.java:14109)
08-16 11:31:03.146: E/AndroidRuntime(2675): at android.os.Handler.handleCallback(Handler.java:605)
08-16 11:31:03.146: E/AndroidRuntime(2675): at android.os.Handler.dispatchMessage(Handler.java:92)
08-16 11:31:03.146: E/AndroidRuntime(2675): at android.os.Looper.loop(Looper.java:137)
08-16 11:31:03.146: E/AndroidRuntime(2675): at android.app.ActivityThread.main(ActivityThread.java:4424)
08-16 11:31:03.146: E/AndroidRuntime(2675): at java.lang.reflect.Method.invokeNative(Native Method)
08-16 11:31:03.146: E/AndroidRuntime(2675): at java.lang.reflect.Method.invoke(Method.java:511)
08-16 11:31:03.146: E/AndroidRuntime(2675): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
08-16 11:31:03.146: E/AndroidRuntime(2675): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
08-16 11:31:03.146: E/AndroidRuntime(2675): at dalvik.system.NativeStart.main(Native Method)
This is the error log.Any Idea?
4.if(viewType.equals("weekly")) ---> 4.if("weekly".equals(viewType))
I think the problem is you are not properly referencing you bundle variable. Please try the below code:
Bundle arguments = this.getIntent().getExtras();
String viewType=arguments.getString("viewType");
And the rest shall remain the same.

android VerifyError

i'm getting this message when i run my application i don't know why i'm getting it could any one help me. here is the logcat.
java.lang.VerifyError: com.kosh.me.Smaller
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1429)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
This happens when the build library classes conflict with those at run-time. Try performing a Clean of your project followed by a build.

App Getting Crashed in version 2.2

I create an android App which works perfectly in Android 2.3+ all devices. But when i tried to run in 2.2 but it crashed and gives error in log as,
08-16 10:22:41.323: E/dalvikvm(442): Could not find class 'android.os.StrictMode$ThreadPolicy$Builder', referenced from method com.uks.android.mssga.activity.LoginActivity.onCreate
08-16 10:22:41.333: W/dalvikvm(442): VFY: unable to resolve new-instance 39 (Landroid/os/StrictMode$ThreadPolicy$Builder;) in Lcom/uks/android/mssga/activity/LoginActivity;
08-16 10:22:41.333: D/dalvikvm(442): VFY: replacing opcode 0x22 at 0x000a
08-16 10:22:41.333: D/dalvikvm(442): VFY: dead code 0x000c-009a in Lcom/uks/android/mssga/activity/LoginActivity;.onCreate (Landroid/os/Bundle;)V
08-16 10:22:41.423: D/dalvikvm(442): GC_EXTERNAL_ALLOC freed 744 objects / 59064 bytes in 68ms
08-16 10:22:41.483: D/AndroidRuntime(442): Shutting down VM
08-16 10:22:41.483: W/dalvikvm(442): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
08-16 10:22:41.483: E/AndroidRuntime(442): FATAL EXCEPTION: main
08-16 10:22:41.483: E/AndroidRuntime(442): java.lang.NoClassDefFoundError: android.os.StrictMode$ThreadPolicy$Builder
08-16 10:22:41.483: E/AndroidRuntime(442): at com.uks.android.mssga.activity.LoginActivity.onCreate(LoginActivity.java:58)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.os.Handler.dispatchMessage(Handler.java:99)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.os.Looper.loop(Looper.java:123)
08-16 10:22:41.483: E/AndroidRuntime(442): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-16 10:22:41.483: E/AndroidRuntime(442): at java.lang.reflect.Method.invokeNative(Native Method)
08-16 10:22:41.483: E/AndroidRuntime(442): at java.lang.reflect.Method.invoke(Method.java:521)
08-16 10:22:41.483: E/AndroidRuntime(442): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-16 10:22:41.483: E/AndroidRuntime(442): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-16 10:22:41.483: E/AndroidRuntime(442): at dalvik.system.NativeStart.main(Native Method)
08-16 10:22:44.503: I/Process(442): Sending signal. PID: 442 SIG: 9
Code of LoginActivity is,
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
.permitAll().build();
StrictMode.setThreadPolicy(policy);
// Other stuff
}
StrictMode.ThreadPolicy.Builder was introduced in Android 2.3 (API level 9), so attempts to call it in versions earlier than that will fail.
To stop it crashing on 2.2 and earlier you can choose to either:
* Remove the ThreadPolicy code (as it is a developer debug tool to provide warnings of bad things you are doing)
or
* Use reflection to determine if the class exists before making use of it

Why Is This Crashing? Android AdView Problems?

I am trying to setup ad in my game but I am having a problem. It seems to be crashing. I have included the logcat below and it has something to do with the ad it seems.
06-07 18:49:54.594: E/dalvikvm(308): Could not find class 'com.google.ads.AdView', referenced from method com.blockyblaine.bobhoil.BlockyBlaine.onCreate
06-07 18:49:54.594: W/dalvikvm(308): VFY: unable to resolve check-cast 17 (Lcom/google/ads/AdView;) in Lcom/blockyblaine/bobhoil/BlockyBlaine;
06-07 18:49:54.603: D/dalvikvm(308): VFY: replacing opcode 0x1f at 0x0011
06-07 18:49:54.603: D/dalvikvm(308): VFY: dead code 0x0013-0069 in Lcom/blockyblaine/bobhoil/BlockyBlaine;.onCreate (Landroid/os/Bundle;)V
06-07 18:49:54.933: D/AndroidRuntime(308): Shutting down VM
06-07 18:49:54.933: W/dalvikvm(308): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
06-07 18:49:55.014: E/AndroidRuntime(308): FATAL EXCEPTION: main
06-07 18:49:55.014: E/AndroidRuntime(308): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.blockyblaine.bobhoil/com.blockyblaine.bobhoil.BlockyBlaine}: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.ads.AdView
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.os.Handler.dispatchMessage(Handler.java:99)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.os.Looper.loop(Looper.java:123)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-07 18:49:55.014: E/AndroidRuntime(308): at java.lang.reflect.Method.invokeNative(Native Method)
06-07 18:49:55.014: E/AndroidRuntime(308): at java.lang.reflect.Method.invoke(Method.java:521)
06-07 18:49:55.014: E/AndroidRuntime(308): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-07 18:49:55.014: E/AndroidRuntime(308): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-07 18:49:55.014: E/AndroidRuntime(308): at dalvik.system.NativeStart.main(Native Method)
06-07 18:49:55.014: E/AndroidRuntime(308): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.ads.AdView
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
06-07 18:49:55.014: E/AndroidRuntime(308): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.Activity.setContentView(Activity.java:1647)
06-07 18:49:55.014: E/AndroidRuntime(308): at com.blockyblaine.bobhoil.BlockyBlaine.onCreate(BlockyBlaine.java:27)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-07 18:49:55.014: E/AndroidRuntime(308): ... 11 more
06-07 18:49:55.014: E/AndroidRuntime(308): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView in loader dalvik.system.PathClassLoader[/data/app/com.blockyblaine.bobhoil-2.apk]
06-07 18:49:55.014: E/AndroidRuntime(308): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
06-07 18:49:55.014: E/AndroidRuntime(308): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
06-07 18:49:55.014: E/AndroidRuntime(308): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
06-07 18:49:55.014: E/AndroidRuntime(308): ... 20 more
06-07 18:50:01.593: I/Process(308): Sending signal. PID: 308 SIG: 9
This link will take you to the admob developers docs. You will need to be sure to follow the directions to have the admob JAR included in your project.
I found a couple of other mentions related to other google api's. The issue there (giving a similar logcat) was this step was missed:
2. Declare com.google.ads.AdActivity in AndroidManifest.xml.
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

OPEN FEINT error in Android App

15 reports
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.oas.fruitkungfufree/com.openfeint.internal.ui.IntroFlow}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.openfeint.internal.Util.setOrientation(Util.java:36)
at com.openfeint.internal.ui.NestedWindow.onCreate(NestedWindow.java:32)
at com.openfeint.internal.ui.WebNav.onCreate(WebNav.java:93)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
Does any one have a solution for this??
This is a problem with your code, you can't use an object that is null. This is a hint.

Categories

Resources