Android Activity Not Found Exception Doesn't Make Sense - android

Okay well I'm trying to make a Live Wallapper but whenever I click on settings it force closes. Saying the activity is not found which doesn't make any sense because, I have it in the Manifest. This is really starting to bug me as I've been at it for over 2 hours.
Logcat:08-28 01:06:49.903: INFO/ActivityManager(1089): Starting activity: Intent { cmp=quotesandothers.livewallpaper.quotesandothers/quotesandothers.livewallpaper.quotesandothers (has extras) }
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): FATAL EXCEPTION: main
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): java.lang.IllegalStateException: Could not execute method of the activity
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View$1.onClick(View.java:2072)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View.performClick(View.java:2408)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View$PerformClick.run(View.java:8816)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.os.Handler.handleCallback(Handler.java:587)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.os.Handler.dispatchMessage(Handler.java:92)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.os.Looper.loop(Looper.java:123)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invokeNative(Native Method)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invoke(Method.java:521)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at dalvik.system.NativeStart.main(Native Method)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): Caused by: java.lang.reflect.InvocationTargetException
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at com.android.wallpaper.livepicker.LiveWallpaperPreview.configureLiveWallpaper(LiveWallpaperPreview.java:113)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invokeNative(Native Method)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invoke(Method.java:521)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View$1.onClick(View.java:2067)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): ... 11 more
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {quotesandothers.livewallpaper.quotesandothers/quotesandothers.livewallpaper.quotesandothers}; have you declared this activity in your AndroidManifest.xml?
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Activity.startActivityForResult(Activity.java:2817)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Activity.startActivity(Activity.java:2923)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): ... 15 more
Manifest:`
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
`

Your code starting an Activity. You have to mention this Activity in your AndroidManifest.xml.
like:
<activity android:name="your.package.name.ActivityClassName">
</activity>
Here is part of interest:
ERROR/AndroidRuntime(15221): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {quotesandothers.livewallpaper.quotesandothers/quotesandothers.livewallpaper.quotesandothers}; have you declared this activity in your AndroidManifest.xml? 08-28

Related

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

Eclipse simulator keep saying Unfortunately, has stopped

08-28 05:00:23.910: D/dalvikvm(784): Not late-enabling CheckJNI
(already on) 08-28 05:00:26.950: D/AndroidRuntime(784): Shutting down
VM 08-28 05:00:26.950: W/dalvikvm(784): threadid=1: thread exiting
with uncaught exception (group=0xb3a74d70) 08-28 05:00:26.960:
E/AndroidRuntime(784): FATAL EXCEPTION: main 08-28 05:00:26.960:
E/AndroidRuntime(784): Process: com.example.geoquiz, PID: 784 08-28
05:00:26.960: E/AndroidRuntime(784): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{com.example.geoquiz/com.example.geoquiz.QuizActivity}:
android.util.AndroidRuntimeException: You cannot combine swipe
dismissal and the action bar. 08-28 05:00:26.960:
E/AndroidRuntime(784): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.app.ActivityThread.access$800(ActivityThread.java:138) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.os.Handler.dispatchMessage(Handler.java:102) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.os.Looper.loop(Looper.java:136) 08-28 05:00:26.960:
E/AndroidRuntime(784): at
android.app.ActivityThread.main(ActivityThread.java:5026) 08-28
05:00:26.960: E/AndroidRuntime(784): at
java.lang.reflect.Method.invokeNative(Native Method) 08-28
05:00:26.960: E/AndroidRuntime(784): at
java.lang.reflect.Method.invoke(Method.java:515) 08-28 05:00:26.960:
E/AndroidRuntime(784): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) 08-28
05:00:26.960: E/AndroidRuntime(784): at
dalvik.system.NativeStart.main(Native Method) 08-28 05:00:26.960:
E/AndroidRuntime(784): Caused by:
android.util.AndroidRuntimeException: You cannot combine swipe
dismissal and the action bar. 08-28 05:00:26.960:
E/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.app.Activity.setContentView(Activity.java:1930) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.example.geoquiz.QuizActivity.onCreate(QuizActivity.java:20) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.app.Activity.performCreate(Activity.java:5242) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
08-28 05:00:26.960: E/AndroidRuntime(784): ... 11 more 08-28
05:15:14.460: D/AndroidRuntime(1119): Shutting down VM 08-28
05:15:14.460: W/dalvikvm(1119): threadid=1: thread exiting with
uncaught exception (group=0xb3a74d70) 08-28 05:15:14.470:
E/AndroidRuntime(1119): FATAL EXCEPTION: main 08-28 05:15:14.470:
E/AndroidRuntime(1119): Process: com.example.geoquiz, PID: 1119 08-28
05:15:14.470: E/AndroidRuntime(1119): java.lang.RuntimeException:
Unable to instantiate application android.test.mock.MockApplication:
java.lang.ClassNotFoundException: Didn't find class
"android.test.mock.MockApplication" on path: DexPathList[[zip file
"/data/app/com.example.geoquiz-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.geoquiz-2, /system/lib]] 08-28 05:15:14.470: E/AndroidRuntime(1119): at
android.app.LoadedApk.makeApplication(LoadedApk.java:507) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:4326)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
android.app.ActivityThread.access$1500(ActivityThread.java:138) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1269)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
android.os.Handler.dispatchMessage(Handler.java:102) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
android.os.Looper.loop(Looper.java:136) 08-28 05:15:14.470:
E/AndroidRuntime(1119): at
android.app.ActivityThread.main(ActivityThread.java:5026) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
java.lang.reflect.Method.invokeNative(Native Method) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
java.lang.reflect.Method.invoke(Method.java:515) 08-28 05:15:14.470:
E/AndroidRuntime(1119): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
dalvik.system.NativeStart.main(Native Method) 08-28 05:15:14.470:
E/AndroidRuntime(1119): Caused by: java.lang.ClassNotFoundException:
Didn't find class "android.test.mock.MockApplication" on path:
DexPathList[[zip file
"/data/app/com.example.geoquiz-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.geoquiz-2, /system/lib]] 08-28 05:15:14.470: E/AndroidRuntime(1119): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
java.lang.ClassLoader.loadClass(ClassLoader.java:497) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
java.lang.ClassLoader.loadClass(ClassLoader.java:457) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
android.app.Instrumentation.newApplication(Instrumentation.java:975)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
android.app.LoadedApk.makeApplication(LoadedApk.java:502) 08-28
05:15:14.470: E/AndroidRuntime(1119): ... 11 more 08-28 05:16:04.770:
D/AndroidRuntime(1162): Shutting down VM 08-28 05:16:04.770:
W/dalvikvm(1162): threadid=1: thread exiting with uncaught exception
(group=0xb3a74d70) 08-28 05:16:04.780: E/AndroidRuntime(1162): FATAL
EXCEPTION: main 08-28 05:16:04.780: E/AndroidRuntime(1162): Process:
com.example.geoquiz, PID: 1162 08-28 05:16:04.780:
E/AndroidRuntime(1162): java.lang.RuntimeException: Unable to
instantiate application android.test.mock.MockApplication:
java.lang.ClassNotFoundException: Didn't find class
"android.test.mock.MockApplication" on path: DexPathList[[zip file
"/data/app/com.example.geoquiz-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.geoquiz-1, /system/lib]] 08-28 05:16:04.780: E/AndroidRuntime(1162): at
android.app.LoadedApk.makeApplication(LoadedApk.java:507) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:4326)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
android.app.ActivityThread.access$1500(ActivityThread.java:138) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1269)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
android.os.Handler.dispatchMessage(Handler.java:102) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
android.os.Looper.loop(Looper.java:136) 08-28 05:16:04.780:
E/AndroidRuntime(1162): at
android.app.ActivityThread.main(ActivityThread.java:5026) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
java.lang.reflect.Method.invokeNative(Native Method) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
java.lang.reflect.Method.invoke(Method.java:515) 08-28 05:16:04.780:
E/AndroidRuntime(1162): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
dalvik.system.NativeStart.main(Native Method) 08-28 05:16:04.780:
E/AndroidRuntime(1162): Caused by: java.lang.ClassNotFoundException:
Didn't find class "android.test.mock.MockApplication" on path:
DexPathList[[zip file
"/data/app/com.example.geoquiz-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.geoquiz-1, /system/lib]] 08-28 05:16:04.780: E/AndroidRuntime(1162): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
java.lang.ClassLoader.loadClass(ClassLoader.java:497) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
java.lang.ClassLoader.loadClass(ClassLoader.java:457) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
android.app.Instrumentation.newApplication(Instrumentation.java:975)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
android.app.LoadedApk.makeApplication(LoadedApk.java:502) 08-28
05:16:04.780: E/AndroidRuntime(1162): ... 11 more 08-28 05:21:04.870:
I/Process(1162): Sending signal. PID: 1162 SIG: 9 08-28 05:27:08.560:
D/AndroidRuntime(1286): Shutting down VM 08-28 05:27:08.560:
W/dalvikvm(1286): threadid=1: thread exiting with uncaught exception
(group=0xb3a74d70) 08-28 05:27:08.570: E/AndroidRuntime(1286): FATAL
EXCEPTION: main 08-28 05:27:08.570: E/AndroidRuntime(1286): Process:
com.example.geoquiz, PID: 1286 08-28 05:27:08.570:
E/AndroidRuntime(1286): java.lang.RuntimeException: Unable to start
activity
ComponentInfo{com.example.geoquiz/com.example.geoquiz.QuizActivity}:
android.util.AndroidRuntimeException: You cannot combine swipe
dismissal and the action bar. 08-28 05:27:08.570:
E/AndroidRuntime(1286): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.app.ActivityThread.access$800(ActivityThread.java:138) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.os.Handler.dispatchMessage(Handler.java:102) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.os.Looper.loop(Looper.java:136) 08-28 05:27:08.570:
E/AndroidRuntime(1286): at
android.app.ActivityThread.main(ActivityThread.java:5026) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
java.lang.reflect.Method.invokeNative(Native Method) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
java.lang.reflect.Method.invoke(Method.java:515) 08-28 05:27:08.570:
E/AndroidRuntime(1286): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
dalvik.system.NativeStart.main(Native Method) 08-28 05:27:08.570:
E/AndroidRuntime(1286): Caused by:
android.util.AndroidRuntimeException: You cannot combine swipe
dismissal and the action bar. 08-28 05:27:08.570:
E/AndroidRuntime(1286): at
com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.app.Activity.setContentView(Activity.java:1930) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.example.geoquiz.QuizActivity.onCreate(QuizActivity.java:20) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.app.Activity.performCreate(Activity.java:5242) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
08-28 05:27:08.570: E/AndroidRuntime(1286): ... 11 more
I'm new to android, what's wrong with this?
See, this is showing exception here. You have made some mistakes in your code. This is your error:
"You cannot combine swipe dismissal and the action bar"
and if you click on this line
"android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217) 08-28 05:27:08.570: E/AndroidRuntime(1286): at "
you will get the exact error in your Java class.

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..

Selecting an item in ListFragment list programmatically

I've made my Android app tablet optimized and I followed the tutorial here:
Everything is great, but I am trying to select an item (say, the 1st item) with a button in the ActionBar.
I tried this answer to use performItemClick but on I've got error reports of java.lang.IllegalStateException
in android.support.v4.app.ListFragment.ensureList, java.lang.IllegalStateException: Content view not yet created, and java.lang.NullPointerException
in android.content.ComponentName.<init>
I've tried checking if the ListView is null and still get the error reports on the Play Store. How do I properly select an item in my list programmatically?
Update to add logcat and the code is virtually identical to the tutorials in the links:
Logcat A:
java.lang.IllegalStateException: Content view not yet created
at android.support.v4.app.ListFragment.ensureList(ListFragment.java:328)
at android.support.v4.app.ListFragment.getListView(ListFragment.java:222)
at com.ccwilcox.meteorshower.MeteorList.showMeteorDetails(MeteorList.java:69)
at com.ccwilcox.meteorshower.MeteorList.onListItemClick(MeteorList.java:62)
at android.support.v4.app.ListFragment$2.onItemClick(ListFragment.java:58)
at android.widget.AdapterView.performItemClick(AdapterView.java:298)
at android.widget.AbsListView.performItemClick(AbsListView.java:1280)
at com.ccwilcox.meteorshower.MainActivity.viewUpcomingEvent(MainActivity.java:648)
at com.ccwilcox.meteorshower.MainActivity.onOptionsItemSelected(MainActivity.java:534)
at android.app.Activity.onMenuItemSelected(Activity.java:2606)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:361)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1045)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
at com.android.internal.view.menu.ActionMenuView.invokeItem(ActionMenuView.java:592)
at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:149)
at android.view.View.performClick(View.java:4222)
at android.view.View$PerformClick.run(View.java:17273)
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:4895)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
Logcat B:
java.lang.NullPointerException
at android.content.ComponentName.<init>(ComponentName.java:75)
at android.content.Intent.<init>(Intent.java:2874)
at com.ccwilcox.meteorshower.MeteorList.showMeteorDetails(MeteorList.java:86)
at com.ccwilcox.meteorshower.MeteorList.onListItemClick(MeteorList.java:62)
at android.support.v4.app.ListFragment$2.onItemClick(ListFragment.java:58)
at android.widget.AdapterView.performItemClick(AdapterView.java:284)
at android.widget.ListView.performItemClick(ListView.java:3701)
at com.ccwilcox.meteorshower.MainActivity.viewUpcomingEvent(MainActivity.java:648)
at com.ccwilcox.meteorshower.MainActivity.onOptionsItemSelected(MainActivity.java:534)
at android.app.Activity.onMenuItemSelected(Activity.java:2205)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:361)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:779)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:143)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:861)
at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:532)
at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
at android.view.View$PerformClick.run(View.java:9152)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Update 2
And here is the code that is causing the problem:
if (mListFragment.listView != null) {
mListFragment.listView.performItemClick(mListFragment.listView.getAdapter().getView(position, null, null), position, mListFragment.listView.getAdapter().getItemId(position));
}

Categories

Resources