Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unexplainable crash error

Tags:

android

My app crashes when I try to run it. I don't know what could be causing this error... It might be related to my previous question but that post wasn't very good so I'll post the new error here.

FATAL EXCEPTION: main
Process: com.myapp, PID: 12693
java.lang.NoSuchFieldError: No static field AppCompatTheme 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/data/com.myapp/files/instant-run/dex/slice-slice_4_13f90a0ab4d497a8a87e7463d225d6b3993606ba-classes.dex)
  at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:336)
  at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:309)
  at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:273)
  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
  at com.myapp.activity.MainActivity.onCreate(MainActivity.java:24)
  at android.app.Activity.performCreate(Activity.java:6374)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2743)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2855)
  at android.app.ActivityThread.access$900(ActivityThread.java:181)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:145)
  at android.app.ActivityThread.main(ActivityThread.java:6117)
  at java.lang.reflect.Method.invoke(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

I can't find any information on this error anywhere else, which is really weird.

like image 263
19lmyers Avatar asked Nov 08 '22 18:11

19lmyers


1 Answers

I ran in to this error now when upgrading my build tools from 23.0.1 to 23.0.2. I spent an hour investigating how I can solve this problem (I did several cleans and rebuilds and none worked).

Eventually, I took 19lymers advice and deleted the app and reinstalled it and then it got fixed.

EDITED:

I don't know whether this is also related or not but before I did the deletion, my app was already buggy - icons which were suppose to be displayed in one location ended up displaying in another location. I think the resource.xml got corrupted. When that happens, best to delete and reinstall. That's the quickest way to solve this issue.

like image 183
Simon Avatar answered Nov 14 '22 22:11

Simon