Getting error: Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza -


i receive error , program crashes when try run app on phone older api level 22. app works fine on phone api level 22. reason that.

here dependencies:

dependencies  {     compile 'com.google.code.gson:gson:2.3'     compile 'com.android.support:appcompat-v7:22.2.0'     compile 'com.android.support:recyclerview-v7:+'     compile 'com.android.support:support-v4:22.2.0'     compile 'com.google.android.gms:play-services:7.5.0'     compile 'com.facebook.android:facebook-android-sdk:4.3.0'     compile 'com.google.android.gms:play-services-analytics:7.5.0'      compile project(':volley')     compile project(':adjust_sdk')     compile project(':euromessagelib')     compile project(':com_viewpagerindicator')      compile files('libs/adxtag3.2.6.jar')     compile files('libs/jsoup-1.7.3.jar')     compile files('libs/cwac-adapter.jar')     compile files('libs/newrelic.android.jar')     compile files('libs/android-query-full.0.26.8.jar')     compile files('libs/khandroid-httpclient-4.2.3.jar')     compile files('libs/googleconversiontrackingsdk-2.2.1.jar')      compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {         transitive = true;     } } 

and

android {     compilesdkversion 22     buildtoolsversion "22.0.1"     defaultconfig {         applicationid "com.deneme"         minsdkversion 14         targetsdkversion 22         multidexenabled true     }     buildtypes {         release {             minifyenabled true             proguardfiles 'proguard.cfg'         }     }     productflavors {     } } 

thanks help

after spending couple of days solve strange problem, found cause of crash. although error persists, program runs without problem now.

the reason why program runs fine api level 22 , not not below 21 method limit in android 65k. above 21 natively supports loading multiple dex files application apk files below 21 not. documents states here

the solution problem solved @ this stackoverflow post

or

if use google play services, instead of compiling whole apis, selectively compile may help. can find more details here.


Comments