如何完全删除OneSignal库?

时间:2018-03-19 10:05:07

标签: android android-studio gradle onesignal

我想彻底删除OneSignal库, 我已从依赖项中删除了它的库

这是gradle应用代码

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'

问题是我无法删除此行

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

当我删除它并将apply plugin: 'com.android.application'放在第一行

我收到此错误

如何修复此错误?或者删除OneSignal的正确方法是什么?

1 个答案:

答案 0 :(得分:1)

您使用的是appcompat-v7库的错误版本,即26.1.0而不是27.1.0。此外,您还可以使用support-compat库:

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}"

这意味着您还必须将编译sdk版本更改为27

compileSdkVersion 27