Application stops with message like "Unfortunately Soduku has Stopped" - android
I am totally new to Android . I am using the book Hello, Android. I have created a button for "about" that displays information about the sudoku game. But as soon as i click it, the application stops saying "Unfortunately sudoku has stopped".
02-22 09:27:27.693: E/AndroidRuntime(554): FATAL EXCEPTION: main 02-22 09:27:27.693: E/AndroidRuntime(554): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.example.sudoku/org.example.sudoku.About}: android.view.InflateException: Binary XML file line #2: Error inflating class scrollview 02-22 09:27:27.693: E/AndroidRuntime(554): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.app.ActivityThread.access$600(ActivityThread.java:123) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.os.Handler.dispatchMessage(Handler.java:99) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.os.Looper.loop(Looper.java:137) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.app.ActivityThread.main(ActivityThread.java:4424) 02-22 09:27:27.693: E/AndroidRuntime(554): at java.lang.reflect.Method.invokeNative(Native Method) 02-22 09:27:27.693: E/AndroidRuntime(554): at java.lang.reflect.Method.invoke(Method.java:511) 02-22 09:27:27.693: E/AndroidRuntime(554): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-22 09:27:27.693: E/AndroidRuntime(554): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-22 09:27:27.693: E/AndroidRuntime(554): at dalvik.system.NativeStart.main(Native Method) 02-22 09:27:27.693: E/AndroidRuntime(554): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class scrollview 02-22 09:27:27.693: E/AndroidRuntime(554): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.view.LayoutInflater.inflate(LayoutInflater.java:466) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 02-22 09:27:27.693: E/AndroidRuntime(554): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.app.Activity.setContentView(Activity.java:1835) 02-22 09:27:27.693: E/AndroidRuntime(554): at org.example.sudoku.About.onCreate(About.java:9) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.app.Activity.performCreate(Activity.java:4465) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) 02-22 09:27:27.693: E/AndroidRuntime(554): ... 11 more 02-22 09:27:27.693: E/AndroidRuntime(554): Caused by: java.lang.ClassNotFoundException: android.view.scrollview 02-22 09:27:27.693: E/AndroidRuntime(554): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 02-22 09:27:27.693: E/AndroidRuntime(554): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 02-22 09:27:27.693: E/AndroidRuntime(554): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.view.LayoutInflater.createView(LayoutInflater.java:552) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:636) 02-22 09:27:27.693: E/AndroidRuntime(554): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653) 02-22 09:27:27.693: E/AndroidRuntime(554): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678) 02-22 09:27:27.693: E/AndroidRuntime(554): ... 20 more 02-22 09:30:52.675: E/AndroidRuntime(582): FATAL EXCEPTION: main 02-22 09:30:52.675: E/AndroidRuntime(582): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.example.sudoku/org.example.sudoku.About}: android.view.InflateException: Binary XML file line #2: Error inflating class scrollview 02-22 09:30:52.675: E/AndroidRuntime(582): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.app.ActivityThread.access$600(ActivityThread.java:123) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.os.Handler.dispatchMessage(Handler.java:99) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.os.Looper.loop(Looper.java:137) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.app.ActivityThread.main(ActivityThread.java:4424) 02-22 09:30:52.675: E/AndroidRuntime(582): at java.lang.reflect.Method.invokeNative(Native Method) 02-22 09:30:52.675: E/AndroidRuntime(582): at java.lang.reflect.Method.invoke(Method.java:511) 02-22 09:30:52.675: E/AndroidRuntime(582): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-22 09:30:52.675: E/AndroidRuntime(582): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-22 09:30:52.675: E/AndroidRuntime(582): at dalvik.system.NativeStart.main(Native Method) 02-22 09:30:52.675: E/AndroidRuntime(582): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class scrollview 02-22 09:30:52.675: E/AndroidRuntime(582): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.view.LayoutInflater.inflate(LayoutInflater.java:466) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 02-22 09:30:52.675: E/AndroidRuntime(582): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.app.Activity.setContentView(Activity.java:1835) 02-22 09:30:52.675: E/AndroidRuntime(582): at org.example.sudoku.About.onCreate(About.java:9) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.app.Activity.performCreate(Activity.java:4465) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) 02-22 09:30:52.675: E/AndroidRuntime(582): ... 11 more 02-22 09:30:52.675: E/AndroidRuntime(582): Caused by: java.lang.ClassNotFoundException: android.view.scrollview 02-22 09:30:52.675: E/AndroidRuntime(582): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 02-22 09:30:52.675: E/AndroidRuntime(582): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 02-22 09:30:52.675: E/AndroidRuntime(582): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.view.LayoutInflater.createView(LayoutInflater.java:552) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:636) 02-22 09:30:52.675: E/AndroidRuntime(582): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653) 02-22 09:30:52.675: E/AndroidRuntime(582): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678) 02-22 09:30:52.675: E/AndroidRuntime(582): ... 20 more 02-22 09:35:04.594: E/AndroidRuntime(596): FATAL EXCEPTION: main 02-22 09:35:04.594: E/AndroidRuntime(596): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.example.sudoku/org.example.sudoku.About}: android.view.InflateException: Binary XML file line #2: Error inflating class scrollview 02-22 09:35:04.594: E/AndroidRuntime(596): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.app.ActivityThread.access$600(ActivityThread.java:123) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.os.Handler.dispatchMessage(Handler.java:99) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.os.Looper.loop(Looper.java:137) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.app.ActivityThread.main(ActivityThread.java:4424) 02-22 09:35:04.594: E/AndroidRuntime(596): at java.lang.reflect.Method.invokeNative(Native Method) 02-22 09:35:04.594: E/AndroidRuntime(596): at java.lang.reflect.Method.invoke(Method.java:511) 02-22 09:35:04.594: E/AndroidRuntime(596): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-22 09:35:04.594: E/AndroidRuntime(596): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-22 09:35:04.594: E/AndroidRuntime(596): at dalvik.system.NativeStart.main(Native Method) 02-22 09:35:04.594: E/AndroidRuntime(596): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class scrollview 02-22 09:35:04.594: E/AndroidRuntime(596): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.view.LayoutInflater.inflate(LayoutInflater.java:466) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 02-22 09:35:04.594: E/AndroidRuntime(596): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.app.Activity.setContentView(Activity.java:1835) 02-22 09:35:04.594: E/AndroidRuntime(596): at org.example.sudoku.About.onCreate(About.java:9) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.app.Activity.performCreate(Activity.java:4465) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) 02-22 09:35:04.594: E/AndroidRuntime(596): ... 11 more 02-22 09:35:04.594: E/AndroidRuntime(596): Caused by: java.lang.ClassNotFoundException: android.view.scrollview 02-22 09:35:04.594: E/AndroidRuntime(596): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 02-22 09:35:04.594: E/AndroidRuntime(596): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 02-22 09:35:04.594: E/AndroidRuntime(596): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.view.LayoutInflater.createView(LayoutInflater.java:552) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:636) 02-22 09:35:04.594: E/AndroidRuntime(596): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653) 02-22 09:35:04.594: E/AndroidRuntime(596): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678) 02-22 09:35:04.594: E/AndroidRuntime(596): ... 20 more 02-22 09:43:32.034: E/AndroidRuntime(610): FATAL EXCEPTION: main 02-22 09:43:32.034: E/AndroidRuntime(610): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.example.sudoku/org.example.sudoku.About}: android.view.InflateException: Binary XML file line #2: Error inflating class scrollview 02-22 09:43:32.034: E/AndroidRuntime(610): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.app.ActivityThread.access$600(ActivityThread.java:123) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.os.Handler.dispatchMessage(Handler.java:99) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.os.Looper.loop(Looper.java:137) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.app.ActivityThread.main(ActivityThread.java:4424) 02-22 09:43:32.034: E/AndroidRuntime(610): at java.lang.reflect.Method.invokeNative(Native Method) 02-22 09:43:32.034: E/AndroidRuntime(610): at java.lang.reflect.Method.invoke(Method.java:511) 02-22 09:43:32.034: E/AndroidRuntime(610): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-22 09:43:32.034: E/AndroidRuntime(610): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-22 09:43:32.034: E/AndroidRuntime(610): at dalvik.system.NativeStart.main(Native Method) 02-22 09:43:32.034: E/AndroidRuntime(610): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class scrollview 02-22 09:43:32.034: E/AndroidRuntime(610): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.view.LayoutInflater.inflate(LayoutInflater.java:466) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 02-22 09:43:32.034: E/AndroidRuntime(610): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.app.Activity.setContentView(Activity.java:1835) 02-22 09:43:32.034: E/AndroidRuntime(610): at org.example.sudoku.About.onCreate(About.java:9) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.app.Activity.performCreate(Activity.java:4465) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) 02-22 09:43:32.034: E/AndroidRuntime(610): ... 11 more 02-22 09:43:32.034: E/AndroidRuntime(610): Caused by: java.lang.ClassNotFoundException: android.view.scrollview 02-22 09:43:32.034: E/AndroidRuntime(610): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 02-22 09:43:32.034: E/AndroidRuntime(610): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 02-22 09:43:32.034: E/AndroidRuntime(610): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.view.LayoutInflater.createView(LayoutInflater.java:552) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:636) 02-22 09:43:32.034: E/AndroidRuntime(610): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653) 02-22 09:43:32.034: E/AndroidRuntime(610): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678) 02-22 09:43:32.034: E/AndroidRuntime(610): ... 20 more
In about.xml Change scrollview to ScrollView and TextView
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dip" >
<TextView
android:id="#+id/about_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/about_text" />
</ScrollView>
Is the buttons's onclick attribute pointing to an existing method in the activity class?
If you have
android:onClick="somefunction"
in the XML layout,
then you must have:
public void somefunction(View view) {
//do stuff
}
in the activity
Error seeems to be here in these statements : at org.example.sudoku.About.onCreate(About.java:9) 02-22
Line 9 of About.java code...most prob related to setContentView()
Check your xml code that you are setting on, seems to be bug there...
Good option while debuging would be to go step by step, like say removing all your xml code here with single textview layout to see if there is problem or not... and so on....
Related
How to diplay image from firebase using only its name
FirebaseStorage storage = FirebaseStorage.getInstance(); StorageReference gsReference = storage.getReferenceFromUrl("gs://bacpoche-5ecb0.appspot.com/natio/agr-svt-2009-6-cr.jpg"); Glide.with(this ) .using(new FirebaseImageLoader()) .load(gsReference) .into(t); But it shows "Unfortunately YourApp has stopped". I already have internet permission in manifest file. Below is the Error The moniteur//E/ AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aitelred.redouane.tstv7/com.aitelred.redouane.tstv7.MainActivity}: java.lang.IllegalArgumentException: The supplied bucketname is not available to this project. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) at android.app.ActivityThread.access$600(ActivityThread.java:123) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) 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:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalArgumentException: The supplied bucketname is not available to this project. at com.google.android.gms.common.internal.zzac.zzb(Unknown Source) at com.google.firebase.storage.FirebaseStorage.zzz(Unknown Source) at com.google.firebase.storage.FirebaseStorage.getReferenceFromUrl(Unknown Source) at com.aitelred.redouane.tstv7.MainActivity.onCreate(MainActivity.java:49) at android.app.Activity.performCreate(Activity.java:4466) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) at android.app.ActivityThread.access$600(ActivityThread.java:123) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) 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:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method)
App crashes when instantiating HelpStackSDK
We tried integrating HelpStack by following steps given on GitHub, but we kept getting the following errors: 04-03 13:54:22.054 4638-4638/com.playerline.android E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{com.playerline.android/com.tenmiles.helpstack.activities.HomeActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992) at android.app.ActivityThread.access$600(ActivityThread.java:127) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4448) 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:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.tenmiles.helpstack.activities.HSActivityParent.onCreate(HSActivityParent.java:48) at com.tenmiles.helpstack.activities.HomeActivity.onCreate(HomeActivity.java:46) at android.app.Activity.performCreate(Activity.java:4465) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992) at android.app.ActivityThread.access$600(ActivityThread.java:127) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4448) 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:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) I'm guessing it has something to do with the App Theme, which in our case is is Theme.AppCompat.NoActionBar.
Unable to start activity NullPointerException-onActivityCreated
My App crash rarely i want to get off this bug for ever. this is the log that users Report i tried so long on this but nothing helps java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx.xxx/com.xxx.xxx.Master_}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2072) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2097) at android.app.ActivityThread.access$600(ActivityThread.java:136) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4787) 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:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.xxx.xxx.HomeFragment.onActivityCreated(HomeFragment.java:140) at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1508) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:958) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1097) at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1895) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:566) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1163) at android.app.Activity.performStart(Activity.java:5018) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2045) ... 11 more
Zbar : startPreview failed in galaxy S3
I have used ZBAR library to scan bar code in my Application. And I got this error log while opening camera on Samsung Galaxy S3 : java.lang.RuntimeException: startPreview failed at android.hardware.Camera.startPreview(Native Method) at com.SGID.MainApp.ScanningFragment.engageCamera(ScanningFragment.java:184) at com.SGID.MainApp.ScanningFragment.access$10(ScanningFragment.java:154) at com.SGID.MainApp.ScanningFragment$4.run(ScanningFragment.java:111) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) 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) java.lang.RuntimeException: Unable to start activity ComponentInfo {com.SGID.MainApp/com.SGID.MainApp.AllTabsActivity} : java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125) at android.app.ActivityThread.access$600(ActivityThread.java:140) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227) 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.NullPointerException at com.SGID.MainApp.ParametersFragment.onCreateView(ParametersFragment.java:78) at android.support.v4.app.Fragment.performCreateView(Fragment.java:1478) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1086) at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1877) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:552) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1167) at android.app.Activity.performStart(Activity.java:5216) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2073) ... 11 more EDIT : Getting error at this line : CameraPreview mPreview = new CameraPreview(getActivity(), mCamera, previewCb, autoFocusCB); Can Anyone help me to resolve this error?? Thanks in advance..
How to identify the error in logcat
I have some error in logcat but i dont know how to identify it. pls help me to find out this problem. My system crashes after running the emulator. I don't know what is an error in my project. Thanks in advance. 02-14 16:45:44.527: D/dalvikvm(562): Not late-enabling CheckJNI (already on) 02-14 16:45:46.407: I/ActivityThread(562): Pub polito.mailandroid: polito.mailandroid.ui.ElementProvider 02-14 16:45:46.417: D/AndroidRuntime(562): Shutting down VM 02-14 16:45:46.417: W/dalvikvm(562): threadid=1: thread exiting with uncaught exception (group=0x409c01f8) 02-14 16:45:46.487: E/AndroidRuntime(562): FATAL EXCEPTION: main 02-14 16:45:46.487: E/AndroidRuntime(562): java.lang.RuntimeException: Unable to get provider polito.mailandroid.ui.ElementProvider: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider 02-14 16:45:46.487: E/AndroidRuntime(562): at android.app.ActivityThread.installProvider(ActivityThread.java:4240) 02-14 16:45:46.487: E/AndroidRuntime(562): at android.app.ActivityThread.installContentProviders(ActivityThread.java:3992) 02-14 16:45:46.487: E/AndroidRuntime(562): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3946) 02-14 16:45:46.487: E/AndroidRuntime(562): at android.app.ActivityThread.access$1300(ActivityThread.java:123) 02-14 16:45:46.487: E/AndroidRuntime(562): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1185) 02-14 16:45:46.487: E/AndroidRuntime(562): at android.os.Handler.dispatchMessage(Handler.java:99) 02-14 16:45:46.487: E/AndroidRuntime(562): at android.os.Looper.loop(Looper.java:137) 02-14 16:45:46.487: E/AndroidRuntime(562): at android.app.ActivityThread.main(ActivityThread.java:4424) 02-14 16:45:46.487: E/AndroidRuntime(562): at java.lang.reflect.Method.invokeNative(Native Method) 02-14 16:45:46.487: E/AndroidRuntime(562): at java.lang.reflect.Method.invoke(Method.java:511) 02-14 16:45:46.487: E/AndroidRuntime(562): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-14 16:45:46.487: E/AndroidRuntime(562): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-14 16:45:46.487: E/AndroidRuntime(562): at dalvik.system.NativeStart.main(Native Method) 02-14 16:45:46.487: E/AndroidRuntime(562): Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider 02-14 16:45:46.487: E/AndroidRuntime(562): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 02-14 16:45:46.487: E/AndroidRuntime(562): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 02-14 16:45:46.487: E/AndroidRuntime(562): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 02-14 16:45:46.487: E/AndroidRuntime(562): at android.app.ActivityThread.installProvider(ActivityThread.java:4225) 02-14 16:45:46.487: E/AndroidRuntime(562): ... 12 more 02-14 16:46:16.637: I/Process(562): Sending signal. PID: 562 SIG: 9 02-14 17:00:46.667: I/ActivityThread(644): Pub polito.mailandroid: polito.mailandroid.ui.ElementProvider 02-14 17:00:46.667: D/AndroidRuntime(644): Shutting down VM 02-14 17:00:46.717: W/dalvikvm(644): threadid=1: thread exiting with uncaught exception (group=0x409c01f8) 02-14 17:00:46.727: E/AndroidRuntime(644): FATAL EXCEPTION: main 02-14 17:00:46.727: E/AndroidRuntime(644): java.lang.RuntimeException: Unable to get provider polito.mailandroid.ui.ElementProvider: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider 02-14 17:00:46.727: E/AndroidRuntime(644): at android.app.ActivityThread.installProvider(ActivityThread.java:4240) 02-14 17:00:46.727: E/AndroidRuntime(644): at android.app.ActivityThread.installContentProviders(ActivityThread.java:3992) 02-14 17:00:46.727: E/AndroidRuntime(644): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3946) 02-14 17:00:46.727: E/AndroidRuntime(644): at android.app.ActivityThread.access$1300(ActivityThread.java:123) 02-14 17:00:46.727: E/AndroidRuntime(644): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1185) 02-14 17:00:46.727: E/AndroidRuntime(644): at android.os.Handler.dispatchMessage(Handler.java:99) 02-14 17:00:46.727: E/AndroidRuntime(644): at android.os.Looper.loop(Looper.java:137) 02-14 17:00:46.727: E/AndroidRuntime(644): at android.app.ActivityThread.main(ActivityThread.java:4424) 02-14 17:00:46.727: E/AndroidRuntime(644): at java.lang.reflect.Method.invokeNative(Native Method) 02-14 17:00:46.727: E/AndroidRuntime(644): at java.lang.reflect.Method.invoke(Method.java:511) 02-14 17:00:46.727: E/AndroidRuntime(644): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-14 17:00:46.727: E/AndroidRuntime(644): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-14 17:00:46.727: E/AndroidRuntime(644): at dalvik.system.NativeStart.main(Native Method) 02-14 17:00:46.727: E/AndroidRuntime(644): Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider 02-14 17:00:46.727: E/AndroidRuntime(644): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 02-14 17:00:46.727: E/AndroidRuntime(644): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 02-14 17:00:46.727: E/AndroidRuntime(644): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 02-14 17:00:46.727: E/AndroidRuntime(644): at android.app.ActivityThread.installProvider(ActivityThread.java:4225) 02-14 17:00:46.727: E/AndroidRuntime(644): ... 12 more 02-14 17:09:00.347: I/ActivityThread(692): Pub polito.mailandroid: polito.mailandroid.ui.ElementProvider 02-14 17:09:00.437: D/AndroidRuntime(692): Shutting down VM 02-14 17:09:00.437: W/dalvikvm(692): threadid=1: thread exiting with uncaught exception (group=0x409c01f8) 02-14 17:09:00.457: E/AndroidRuntime(692): FATAL EXCEPTION: main 02-14 17:09:00.457: E/AndroidRuntime(692): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{polito.mailandroid.ui/polito.mailandroid.ui.ui.LoginUI}: java.lang.ClassNotFoundException: polito.mailandroid.ui.ui.LoginUI 02-14 17:09:00.457: E/AndroidRuntime(692): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880) 02-14 17:09:00.457: E/AndroidRuntime(692): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 02-14 17:09:00.457: E/AndroidRuntime(692): at android.app.ActivityThread.access$600(ActivityThread.java:123) 02-14 17:09:00.457: E/AndroidRuntime(692): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 02-14 17:09:00.457: E/AndroidRuntime(692): at android.os.Handler.dispatchMessage(Handler.java:99) 02-14 17:09:00.457: E/AndroidRuntime(692): at android.os.Looper.loop(Looper.java:137) 02-14 17:09:00.457: E/AndroidRuntime(692): at android.app.ActivityThread.main(ActivityThread.java:4424) 02-14 17:09:00.457: E/AndroidRuntime(692): at java.lang.reflect.Method.invokeNative(Native Method) 02-14 17:09:00.457: E/AndroidRuntime(692): at java.lang.reflect.Method.invoke(Method.java:511) 02-14 17:09:00.457: E/AndroidRuntime(692): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-14 17:09:00.457: E/AndroidRuntime(692): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-14 17:09:00.457: E/AndroidRuntime(692): at dalvik.system.NativeStart.main(Native Method) 02-14 17:09:00.457: E/AndroidRuntime(692): Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ui.LoginUI 02-14 17:09:00.457: E/AndroidRuntime(692): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 02-14 17:09:00.457: E/AndroidRuntime(692): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 02-14 17:09:00.457: E/AndroidRuntime(692): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 02-14 17:09:00.457: E/AndroidRuntime(692): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 02-14 17:09:00.457: E/AndroidRuntime(692): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871) 02-14 17:09:00.457: E/AndroidRuntime(692): ... 11 more
The classes polito.mailandroid.ui.ui.LoginUI and polito.mailandroid.ui.ElementProvider were not found. You should check the .apk and your build script to include them.
Its class Not found exception. make sure class you are using is exists or not and do entry in manifest of particular activity.
The error is 02-14 17:00:46.727: E/AndroidRuntime(644): Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider Have you forgotten to declare your ContentProvider in AndroidManifest.xml?
You are facing a RuntimeException that was not handled. It is Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider because most probably you did not define it in the Manifest file
Your are facing this error please see to it 02-14 16:45:46.487: E/AndroidRuntime(562): java.lang.RuntimeException: Unable to get provider polito.mailandroid.ui.ElementProvider: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider
It seems ur new to java . Read about Exception in java that will help .And for the time being look for error which contains the name of the package or file and read the Caused By error .
i.e error from the Logcat Caused by: java.lang.ClassNotFoundException: polito.mailandroid.ui.ElementProvider 02-14 16:45:46.487: E/AndroidRuntime(562): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)