1

I am integrating claverTap in my app, I followed the integration document, but when I run my app this following error comes :-

com.clevertap.android.sdk.exceptions.CleverTapPermissionsNotSatisfied: Permission required: android.permission.INTERNET

issue, even I have added internet permission in AndroidManifest.xml file also,

Application Class Code Is

public class MyApplication extends Application {
public static CleverTapAPI cleverTap;
@Override
public void onCreate() {
    Log.e("application","class0");

        CleverTapAPI.setDebugLevel(1);
        CleverTapAPI.changeCredentials("","");
        ActivityLifecycleCallback.register(this); // Must be called before super.onCreate() of Application Class
        Log.e("application","class1");

        try {
            cleverTap = CleverTapAPI.getInstance(getApplicationContext());
            Log.e("application","class2");

        } catch (CleverTapMetaDataNotFoundException e) {
            e.printStackTrace();
        } catch (CleverTapPermissionsNotSatisfied cleverTapPermissionsNotSatisfied) {
            cleverTapPermissionsNotSatisfied.printStackTrace();

    }
    super.onCreate();

}

If i Change the > support version to v4 it will show exception

E/CleverTap: Error checking Google Play services availability
                                                         java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GoogleApiAvailability;
                                                             at com.clevertap.android.sdk.DeviceInfo.isGooglePlayServicesAvailable(DeviceInfo.java:274)
Ahmad
  • 201
  • 2
  • 12

2 Answers2

1

Seems like you're on an older library.

The library depends on the Android v4 support library, minimum revision 23.1.1.

Make sure you add this. More information on support libraries can be found here

compile 'com.android.support:design:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'

I hope it will work for you.

Rehan Sarwar
  • 994
  • 8
  • 20
1

Did you try giving the permission for the Application? when you install the application to your phone it will automatically turn off the permissions, so you need to give them manually!

virusivv
  • 337
  • 2
  • 5
  • 17
  • how i will give permission in it? – Ahmad Aug 01 '17 at 13:06
  • Sorry for late response, go to "settings->Apps or Application Manager->Select the app you developed->Select Permissions" and give the permissions you require. – virusivv Aug 19 '17 at 21:27