gpt4 book ai didi

java - 更新 firebase 和 Google 服务依赖项后无法构建项目

转载 作者:行者123 更新时间:2023-12-02 02:30:42 25 4
gpt4 key购买 nike

我更新了应用程序和项目级别 gradle 文件中的所有依赖库。现在,每当我尝试构建我的项目时,它都会显示错误。在寻找解决方案时,从 stackoverflow 得到了一些提示,但没有成功。下面是我在 gradle 文件中使用的代码。

项目级别分级

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'
classpath 'com.jakewharton:butterknife-gradle-plugin:10.1.0'
classpath 'com.google.firebase:perf-plugin:1.3.0'
} }

allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://github.com/leonardocardoso/mvn-repo/raw/master/maven-deploy' }
google()
} }

应用级 gradle 依赖

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

dependencies {
classpath 'io.fabric.tools:gradle:1.27.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'io.fabric'

repositories {
mavenCentral()
maven {
url 'https://s3-ap-southeast-1.amazonaws.com/jp-build-packages/ec-android-sdk'
}
maven {
url 'https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/'
}
maven { url 'https://maven.fabric.io/public' }
google()
}


android {
compileSdkVersion 28

defaultConfig {
applicationId "xx.xx.xxxx"
minSdkVersion 16

targetSdkVersion 28

versionCode 175
versionName "3.6.7.5"

multiDexEnabled true
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true

proguardFile '../proguard/proguard-project.pro'
proguardFile '../proguard/proguard-google-play-services.pro'
proguardFile '../proguard/proguard-apache.pro'
proguardFile '../proguard/proguard-crashlytics.pro'
proguardFile '../proguard/proguard-clevertap.pro'
proguardFile '../proguard/proguard-aws.pro'
proguardFile '../proguard/proguard-mpandroidchart.pro'
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
debug {
}
lintOptions {
warning 'InvalidPackage'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
dexOptions {
javaMaxHeapSize "4g"
jumboMode = true
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.crashlytics.sdk.android:crashlytics:2.5.3@aar') {
transitive = true;
}

implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'

implementation 'com.google.android.gms:play-services-base:17.0.0'
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
implementation 'com.google.android.gms:play-services-basement:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-plus:17.0.0'

implementation 'com.google.firebase:firebase-ads:18.1.1'
implementation 'com.google.firebase:firebase-invites:17.0.0'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-appindexing:19.0.0'
implementation 'com.google.firebase:firebase-perf:18.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'

implementation 'com.amazonaws:aws-android-sdk-core:2.3.3'
implementation 'com.amazonaws:aws-android-sdk-cognito:2.3.3'
implementation 'com.amazonaws:aws-android-sdk-s3:2.3.3'
implementation 'com.amazonaws:aws-android-sdk-ddb:2.3.3'
implementation 'com.soundcloud.android:android-crop:1.0.0@aar'
implementation 'com.clevertap.android:clevertap-android-sdk:3.1.10'
implementation 'com.facebook.android:facebook-android-sdk:4.34.0'

implementation 'com.android.volley:volley:1.1.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.0-beta1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.github.bumptech.glide:glide:3.7.0'

implementation "org.apache.httpcomponents:httpmime:4.5.6"
implementation files('libs/stickygridheaders.jar')
implementation 'org.jsoup:jsoup:1.8.3'
implementation 'com.android.support:multidex:1.0.3'

implementation files('libs/PGSDK_V2.1.jar')
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation "org.java-websocket:Java-WebSocket:1.4.0"
//implementation 'in.juspay:ec-android-sdk:1.1.18'

implementation 'com.facebook.android:audience-network-sdk:4.26.1'
implementation 'com.google.ads.mediation:facebook:4.26.1.0'


implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
}

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

错误消息的屏幕截图

enter image description here

enter image description here

enter image description here

最佳答案

尝试将其添加到 gradle 文件中的 android 配置部分下:

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

关于java - 更新 firebase 和 Google 服务依赖项后无法构建项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57231879/

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