Islam Ahmed
Islam Ahmed

Reputation: 736

How can I completely remove OneSignal library?

I am trying to completely remove OneSignal library , I have deleted its library from dependencies

This is gradle app code

plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}

repositories {
maven { url 'https://maven.google.com' }
}

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
    applicationId "xxx.xxxxxx.xxxxx"
    minSdkVersion 17
    targetSdkVersion 26
    versionCode 3
    versionName "1.0"
    multiDexEnabled true
    vectorDrawables.useSupportLibrary = true
    testInstrumentationRunner 
   "android.support.test.runner.AndroidJUnitRunner"
   }
 buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
   'proguard-rules.pro'
    }
 }
 }

 repositories {
jcenter()
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.firebaseui:firebase-ui-database:3.2.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso- 
core:2.2.2'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.facebook.android:account-kit-sdk:4.+'
compile 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.github.whalemare:sheetmenu:1.3.3'
compile 'com.squareup.okhttp3:okhttp:3.7.0'
compile 'com.android.support:recyclerview-v7:+'
implementation 'com.squareup.picasso:picasso:2.71828'
compile 'de.hdodenhof:circleimageview:2.2.0'
}


apply plugin: 'com.google.gms.google-services'

The problem is that I can't remove this line

plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}

when I delete it and put apply plugin: 'com.android.application' in the first line

I get this error

How can I fix this error ? Or What is the right way to remove OneSignal ?

Upvotes: 3

Views: 976

Answers (1)

Benjamin
Benjamin

Reputation: 7368

You're using the wrong version of the appcompat-v7 library i.e. 26.1.0 instead of 27.1.0. Also, you've to use the support-compat library:

def final support_libraries_version = '27.1.0'
implementation "com.android.support:appcompat-v7:${support_libraries_version}"
implementation "com.android.support:support-compat:${support_libraries_version}"

which means you'll also have to change your compile sdk version to 27:

compileSdkVersion 27

Upvotes: 1

Related Questions