天天看點

運作apk,出現java.lang.NoSuchMethodError: No static method checkSelfPermission問題,解決方法

         之前是用eclipse出包沒有eclipse一直沒有出現下面報錯資訊的問題,最近用Android studio打包,build.gradle使用依賴引入v4包,然後打包就出現下面這個問題,查閱多個資料後發現有些android-support-v4是會出現這個方法找不到問題,替換正常的V4即可解決了。小弟才疏學淺,表達的是不是很清楚,但希望能幫到大家,減少大家的時間。

.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)