我知道有很多关于此的问题,但我已经尝试了StackOverflow的所有解决方案,但我仍然没有解决这个问题
我的应用级build.gradle文件是
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.aple.gole.video"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "0.1"
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id: "a1bdfc88-fffb-4283-9c45-8a15b3bbd3a2",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
}
buildTypes {
release {
shrinkResources false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:customtabs:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.code.gson:gson:2.7'
compile 'org.jsoup:jsoup:1.8.3'
compile 'org.mozilla:rhino:1.7.7'
compile 'ch.acra:acra:4.9.0'
compile 'info.guardianproject.netcipher:netcipher:1.2'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.github.nirhart:parallaxscroll:1.0'
compile 'com.nononsenseapps:filepicker:3.0.0'
compile 'com.google.android.exoplayer:exoplayer:r2.4.2'
compile ('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
compile ('com.onesignal:OneSignal:[3.5.3,4.0.0)') {
exclude group: 'com.google.android.gms', module: 'play-services'
}
compile 'com.github.varunest:sparkbutton:1.0.5'
compile 'com.google.firebase:firebase-database:11.0.2'
}
apply plugin: 'com.google.gms.google-services'
当我使用此
时,我开始遇到此问题 apply plugin: 'com.google.gms.google-services'
但是它需要firebase
我的项目级build.gradle是
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
maven { url "https://jitpack.io" }
}
}
从外部图书馆我找到了不同版本的Google Play服务
可能会出现问题,让我分享一下你的截图
please click here to check screenshot
但现在问题是为什么有不同版本的Google Play服务,一个是 Play Service iid 10.0.1 ,另一个是播放服务任务11.0.2 ,如何使它相同
答案 0 :(得分:0)
您好我发现你
compile 'com.google.firebase:firebase-database:11.0.2'
正在使用
google-play-service lib 11.0.2
你可以这样做
compile 'com.google.firebase:firebase-database:10.0.1'
所以它将使用
google-play-service lib 10.0.1
它会起作用,我已经测试了