Unexplained Crash Error

My application crashes when I try to run it. I do not know what might cause this error ... Perhaps this is due to my previous question, but this post was not very good, so I will post a 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 not find any information about this error elsewhere, which is really strange.

+5
source share
1 answer

Now I encountered this error when updating build tools from 23.0.1 to 23.0.2. I spent an hour researching how I can solve this problem (I did some cleanups and rebuilds and no one worked).

In the end, I took the advice of 19lymers and uninstalled the application and reinstalled it, and then it was fixed.

Edition:

I don’t know if this is connected or not, but before I deleted it, my application was already a mistake - the icons that were supposedly displayed in one place ended up in another place. I think resource.xml is corrupt. When this happens, it is best to uninstall and reinstall. This is the fastest way to solve this problem.

+1
source

Source: https://habr.com/ru/post/1245519/


All Articles