gpt4 book ai didi

java - 无法导入 Google Analytics

转载 作者:太空宇宙 更新时间:2023-11-04 10:25:09 24 4
gpt4 key购买 nike

我已经编译了 gradle 文件,但无法在我的项目中导入与 Google Analytics 相关的任何文件。在一个新项目中它可以工作,但在这个项目中不行。我不知道出了什么问题。

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.protobuf'


android {
signingConfigs {
}
compileSdkVersion 26
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.whizkidzmedia.youhuu"
minSdkVersion 21
targetSdkVersion 26
versionCode 40
versionName "3.1"
multiDexEnabled = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
debuggable false
minifyEnabled false
// shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled false
//shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
}
productFlavors {
}
}

protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.0.0-beta-3'
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:0.15.0'
}
}
generateProtoTasks {
all().each {
task ->
task.builtins {
remove javanano
java {
}
}
task.plugins {
grpc {
}
}
}
}
}

ext {
supportLibraryVersion = '24.2.1'
grpcVersion = '0.15.0'
}





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

}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})


// compile 'com.google.android.gms:play-services-appindexing:10.0.0'

compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true;
}
compile files('libs/fortumo-in-app-android-sdk.jar')
compile("io.grpc:grpc-protobuf:${grpcVersion}") {
exclude module: 'jsr305'
}
compile("io.grpc:grpc-stub:${grpcVersion}") {
exclude module: 'jsr305'
}
compile("io.grpc:grpc-auth:${grpcVersion}") {
exclude module: 'jsr305'
}
compile("io.grpc:grpc-okhttp:${grpcVersion}") {
exclude module: 'jsr305'
}
// OAuth2 for Google API
compile('com.google.auth:google-auth-library-oauth2-http:0.3.0') {
exclude module: 'jsr305'
exclude module: 'httpclient'
}

compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.android.support:percent:26.1.0'
compile 'com.google.firebase:firebase-messaging:11.6.2'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.google.android.gms:play-services-auth:11.6.2'
compile 'javax.annotation:javax.annotation-api:1.2'
compile 'com.google.android.gms:play-services-cast-framework:11.6.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services-analytics:11.6.2'
testCompile 'junit:junit:4.12'
}

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.0'
}
}
}
}


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

请让我知道如何解决这个问题。这是项目级别gradle中的类路径。

类路径'com.android.tools.build:gradle:2.3.2'类路径“com.google.gms:google-services:3.1.1”

最佳答案

Android IDE 重启修复了此问题

关于java - 无法导入 Google Analytics,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50630504/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com