After updating my app is crashing while starting with the following stacktrace:
02-12 14:01:26.158: W/System(8631): ClassLoader referenced unknown path: /data/app/com.example.ib-2/lib/arm
02-12 14:01:26.222: D/AndroidRuntime(8631): Shutting down VM
02-12 13:36:30.061: E/AndroidRuntime(7312): FATAL EXCEPTION: main
02-12 13:36:30.061: E/AndroidRuntime(7312): Process: com.example.ib, PID: 7312
02-12 13:36:30.061: E/AndroidRuntime(7312): java.lang.NoSuchFieldError: No static field View_theme of type I in class Landroid/support/v7/appcompat/R$styleable; or its superclasses (declaration of 'android.support.v7.appcompat.R$styleable' appears in /data/app/com.example.ib-1/base.apk)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.support.v7.app.AppCompatViewInflater.themifyContext(AppCompatViewInflater.java:229)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:84)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:938)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:992)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:746)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
02-12 13:36:30.061: E/AndroidRuntime(7312): at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:3909)
02-12 13:36:30.061: E/AndroidRuntime(7312): at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:3981)
02-12 13:36:30.061: E/AndroidRuntime(7312): at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:1969)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.support.v7.app.AppCompatDelegateImplV7.onCreate(AppCompatDelegateImplV7.java:149)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:60)
02-12 13:36:30.061: E/AndroidRuntime(7312): at com.example.ib.MainActivity.onCreate(MainActivity.java:77)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.app.Activity.performCreate(Activity.java:6251)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.app.ActivityThread.-wrap11(ActivityThread.java)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.os.Handler.dispatchMessage(Handler.java:102)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.os.Looper.loop(Looper.java:148)
02-12 13:36:30.061: E/AndroidRuntime(7312): at android.app.ActivityThread.main(ActivityThread.java:5417)
02-12 13:36:30.061: E/AndroidRuntime(7312): at java.lang.reflect.Method.invoke(Native Method)
02-12 13:36:30.061: E/AndroidRuntime(7312): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
02-12 13:36:30.061: E/AndroidRuntime(7312): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I have copied appcompat jar files to the imported appcompat project, still, it doesn't work. Please help
Related
I am building an application in which I am inserting events directly to the calendar plus I left the possibility to invite someone else and everything is perfectly fine if I execute it on android sdk version 19 and above, on lower versions I get an exception.
Here is the source:
ContentResolver atend = getContentResolver();
ContentValues val = new ContentValues();
val.put(CalendarContract.Attendees.ATTENDEE_NAME, "Bajo");
val.put(CalendarContract.Attendees.ATTENDEE_EMAIL, someonesEmail);
val.put(CalendarContract.Attendees.ATTENDEE_RELATIONSHIP, CalendarContract.Attendees.RELATIONSHIP_ATTENDEE);
val.put(CalendarContract.Attendees.ATTENDEE_TYPE, CalendarContract.Attendees.TYPE_REQUIRED);
val.put(CalendarContract.Attendees.ATTENDEE_STATUS, CalendarContract.Attendees.ATTENDEE_STATUS_INVITED);
val.put(CalendarContract.Attendees.EVENT_ID, eventID);
Uri muri= atend.insert(CalendarContract.Attendees.CONTENT_URI, val);
Log.d("Atendees URI:",muri.toString());
long Aeventid=Long.parseLong(muri.getLastPathSegment());
the Exception:
03-05 19:45:59.681 1255-1266/? E/DatabaseUtils﹕ Writing exception to parcel
android.database.sqlite.SQLiteDoneException
at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:591)
at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:816)
at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:804)
at com.android.providers.calendar.CalendarDatabaseHelper.duplicateEvent(CalendarDatabaseHelper.java:3311)
at com.android.providers.calendar.CalendarProvider2.insertInTransaction(CalendarProvider2.java:2265)
at com.android.providers.calendar.SQLiteContentProvider.insert(SQLiteContentProvider.java:96)
at android.content.ContentProvider$Transport.insert(ContentProvider.java:201)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:148)
at android.os.Binder.execTransact(Binder.java:367)
at dalvik.system.NativeStart.run(Native Method)
03-05 19:45:59.681 1632-1632/? D/AndroidRuntime﹕ Shutting down VM
03-05 19:45:59.681 1632-1632/? W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xb2f7e288)
03-05 19:45:59.681 1632-1632/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3591)
at android.view.View.performClick(View.java:4084)
at android.view.View$PerformClick.run(View.java:16966)
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:4745)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3586)
at android.view.View.performClick(View.java:4084)
at android.view.View$PerformClick.run(View.java:16966)
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:4745)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteException
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:184)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:420)
at android.content.ContentResolver.insert(ContentResolver.java:864)
at com.example.rusev.vetcalendar.MainActivity.insertToCalendarImmunization(MainActivity.java:809)
at com.example.rusev.vetcalendar.MainActivity.syncToCalendar(MainActivity.java:931)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3586)
at android.view.View.performClick(View.java:4084)
at android.view.View$PerformClick.run(View.java:16966)
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:4745)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Can you help me to identify what I miss?
My app crashes when I try to open in. The only change I've made was adding a .ogg file to my res/raw directory. It's really weird. I haven't added any codes or made any other changes. I just dragged a sound file into raw and compiled. It just keeps saying "unfortunately blah has stopped". Are there any obvious things I should check?
MainActivity.onCreate:
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.engine_layout);
myEngineView = (EngineView) findViewById(R.id.engineviewid);
myEngineView.setKeepScreenOn(true);
}
I get this in logcat:
E/AndroidRuntime(12560): FATAL EXCEPTION: main
E/AndroidRuntime(12560): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.thing/com.example.thing.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime(12560): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
E/AndroidRuntime(12560): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
E/AndroidRuntime(12560): at android.app.ActivityThread.access$600(ActivityThread.java:149)
E/AndroidRuntime(12560): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
E/AndroidRuntime(12560): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12560): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime(12560): at android.app.ActivityThread.main(ActivityThread.java:4987)
E/AndroidRuntime(12560): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12560): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12560): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
E/AndroidRuntime(12560): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
E/AndroidRuntime(12560): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12560): Caused by: java.lang.NullPointerException
E/AndroidRuntime(12560): at com.example.thing.MainActivity.onCreate(MainActivity.java:18)
E/AndroidRuntime(12560): at android.app.Activity.performCreate(Activity.java:5020)
E/AndroidRuntime(12560): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime(12560): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime(12560): ... 11 more
E/AppErrorDialog( 338): Failed to get ILowStorageHandle instance
E/Trace (12585): error opening trace file: No such file or directory (2)
E/AndroidRuntime(12585): FATAL EXCEPTION: main
E/AndroidRuntime(12585): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.thing/com.example.thing.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime(12585): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
E/AndroidRuntime(12585): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
E/AndroidRuntime(12585): at android.app.ActivityThread.access$600(ActivityThread.java:149)
E/AndroidRuntime(12585): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
E/AndroidRuntime(12585): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12585): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime(12585): at android.app.ActivityThread.main(ActivityThread.java:4987)
E/AndroidRuntime(12585): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12585): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12585): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
E/AndroidRuntime(12585): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
E/AndroidRuntime(12585): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12585): Caused by: java.lang.NullPointerException
E/AndroidRuntime(12585): at com.example.thing.MainActivity.onCreate(MainActivity.java:18)
E/AndroidRuntime(12585): at android.app.Activity.performCreate(Activity.java:5020)
E/AndroidRuntime(12585): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime(12585): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime(12585): ... 11 more
Here is what I am doing
ImageView image2 = (ImageView) findViewById(R.id.imageView3);
image2.getDrawable().setCallback(null);
image2.setImageResource(R.drawable.fire);
where fire is an xml file proposing an animation drawable
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true">
<item android:drawable="#drawable/fire1" android:duration="50" />
<item android:drawable="#drawable/fire2" android:duration="50" />
<item android:drawable="#drawable/fire3" android:duration="50" />
<item android:drawable="#drawable/fire4" android:duration="50" />
<item android:drawable="#drawable/fire5" android:duration="50" />
...
<item android:drawable="#drawable/fire16" android:duration="50" />
I have this error
02-12 11:37:20.919: E/dalvikvm-heap(3193): 1535664-byte external allocation too large for this process.
02-12 11:37:20.959: E/GraphicsJNI(3193): VM won't let us allocate 1535664 bytes
02-12 11:37:20.959: W/dalvikvm(3193): threadid=1: thread exiting with uncaught exception (group=0x40018560)
02-12 11:37:20.979: E/AndroidRuntime(3193): FATAL EXCEPTION: main
02-12 11:37:20.979: E/AndroidRuntime(3193): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.content.res.Resources.loadDrawable(Resources.java:1709)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.content.res.Resources.getDrawable(Resources.java:581)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.graphics.drawable.AnimationDrawable.inflate(AnimationDrawable.java:267)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:787)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:728)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.content.res.Resources.loadDrawable(Resources.java:1694)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.content.res.Resources.getDrawable(Resources.java:581)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.widget.ImageView.resolveUri(ImageView.java:501)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.widget.ImageView.setImageResource(ImageView.java:280)
02-12 11:37:20.979: E/AndroidRuntime(3193): at com.example.kersplatt.GameActivity.onCreate(GameActivity.java:71)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.os.Looper.loop(Looper.java:130)
02-12 11:37:20.979: E/AndroidRuntime(3193): at android.app.ActivityThread.main(ActivityThread.java:3683)
02-12 11:37:20.979: E/AndroidRuntime(3193): at java.lang.reflect.Method.invokeNative(Native Method)
02-12 11:37:20.979: E/AndroidRuntime(3193): at java.lang.reflect.Method.invoke(Method.java:507)
02-12 11:37:20.979: E/AndroidRuntime(3193): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875)
02-12 11:37:20.979: E/AndroidRuntime(3193): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
02-12 11:37:20.979: E/AndroidRuntime(3193): at dalvik.system.NativeStart.main(Native Method)
I read so many threads about memory leaks, memory errors (for instance java.lang.OutOfMemoryError: bitmap size exceeds VM budget - Android) but I didn't succeed in solving my problem
When I remplace image2.setImageResource(R.drawable.fire); by image2.setImageResource(R.drawable.fire1); where fire1 is a simple png, everything works fine
What could I do to solve my problem
To remove OutOfMemory error, you should focus on scaling. You can find at http://developer.android.com/training/displaying-bitmaps/load-bitmap.html
These error messages appear when I run my Application. It doesn't affect the execution of the application though. The app is based on Android 4 ( API Level 14), it has some code to call a web service, and the build path has http-commons library.
02-12 10:39:11.110: E/AndroidRuntime(661): java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.NullPointerException
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.LoadedApk.makeApplication(LoadedApk.java:482)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3909)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.ActivityThread.access$1300(ActivityThread.java:122)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1184)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.os.Looper.loop(Looper.java:137)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.ActivityThread.main(ActivityThread.java:4340)
02-12 10:39:11.110: E/AndroidRuntime(661): at java.lang.reflect.Method.invokeNative(Native Method )
02-12 10:39:11.110: E/AndroidRuntime(661): at java.lang.reflect.Method.invoke(Method.java:511)
02-12 10:39:11.110: E/AndroidRuntime(661): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-12 10:39:11.110: E/AndroidRuntime(661): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-12 10:39:11.110: E/AndroidRuntime(661): at dalvik.system.NativeStart.main(Native Method)
02-12 10:39:11.110: E/AndroidRuntime(661): Caused by: java.lang.NullPointerException
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:362)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.LoadedApk.getClassLoader(LoadedApk.java:305)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.LoadedApk.makeApplication(LoadedApk.java:474)
02-12 10:39:11.110: E/AndroidRuntime(661): ... 11 more
If you google for initializeJavaContextClassLoader NullPointerException you'll find you are definitely not the only one running into this. The solution isn't really clear though.
Have you tried doing a Project -> Clean and rebuilding?
Ive follow the tutoria about how to make activity Gallery on [android-developer][1]
[1]: http://developer.android.com/guide/tutorials/views/hello-gallery.html but i got the next error:
02-12 17:54:06.221: ERROR/AndroidRuntime(1330): Uncaught handler: thread main exiting due to uncaught exception
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.addsensor.CameraMap/com.addsensor.CameraMap.GalleryCamera}: java.lang.NullPointerException
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.os.Looper.loop(Looper.java:123)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread.main(ActivityThread.java:3948)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at java.lang.reflect.Method.invokeNative(Native Method)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at java.lang.reflect.Method.invoke(Method.java:521)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at dalvik.system.NativeStart.main(Native Method)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): Caused by: java.lang.NullPointerException
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at com.addsensor.CameraMap.GalleryCamera.onCreate(GalleryCamera.java:20)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
I have also change one thing which someone comment here, on [stackoverflow][1]
[1]: Android Hello, Gallery tutorial -- "R.styleable cannot be resolved" but i am still getting the error. Its a simple activity and i dont know how to follow. Anyone knows?¿ or how to fix it?¿
thanks
You are trying to use a reference to null (e.g. variable uninitialized, etc..) in CameraMap.GalleryCamera,onCreate() method, line 20.
Please post code for this method (and indicate line number 20).