Run apk, java.lang.NoSuchMethodError: No static method checkSelfPermission problem appears, solution

         Before I used eclipse to export the package without eclipse, the following error message did not appear. Recently, I used Android studio to package, build.gradle used dependencies to import the v4 package, and then packaged the following problem. After consulting multiple materials, I found some android-support -v4 is a problem that this method cannot be found, and it can be solved by replacing the normal V4. The younger brother is a little talented and knowledgeable, and I am not very clear about the expression, but I hope it can help everyone and save everyone's time.

.java.lang.NoSuchMethodError: No static method checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in /data/app/com.test.aynewxinxin-1/base.apk)

 

Guess you like

Origin blog.csdn.net/sandy_chen_onlyone/article/details/100703516