I tried to update all the libraries, but i still got errors. I am able to run the app on the simulator, but when I export the APK and run it on a real android device, the ap
Have you enabled Proguard in your build? If so, you may want to ensure that the appcompat libraries are in the Proguard exclusion list (in proguard.cfg). A brute force approach is to keep all the support library classes with:
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class android.support.v7.app.** { *; }
-keep interface android.support.v7.app.** { *; }
In my case, I had a class that extended the support library's SearchView so I added this to my proguard.cfg:
-keep public class * extends android.support.v7.widget.SearchView {
public (android.content.Context);
public (android.content.Context, android.util.AttributeSet);
}
The constructors are specifically mentioned to avoid the error:
java.lang.NoSuchMethodException: [class android.content.Context]