gpt4 book ai didi

android - gradle.build文件中的问题

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

这是我的gradle.build代码,正在收到未找到库之类的问题,并在我更改为最新版本后更新该版本,还获得了初学者并为我的最后一年项目创建聊天应用程序的消息。

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "afterapps.com.firebaseim"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter()
maven{
url "https://maven.google.com"
}
}
repositories {
jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'frankiesardo:icepick:3.2.0'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.jakewharton:butterknife:8.4.0'
implementation 'com.zsoltsafrany:needle:1.0.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
provided 'frankiesardo:icepick-processor:3.2.0'
implementation 'joda-time:joda-time:2.9.7'
}



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

https://github.com/MahmoudAlyuDeen/FirebaseIM

最佳答案

这些依赖关系通常已经过时了... Gradle包装器应该是5.4.1

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
}
}

allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://clojars.org/repo/" }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
mavenCentral()
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
com.android.support仅适用于不使用 androidx的Firebase库版本:
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.afterapps.firebaseim"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
// https://firebase.google.com/support/release-notes/android#2019-06-17
//noinspection GradleDependency
implementation 'com.google.firebase:firebase-messaging:19.2.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'frankiesardo:icepick:3.2.0'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.zsoltsafrany:needle:1.0.0'
implementation 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compileOnly 'frankiesardo:icepick-processor:3.2.0'
implementation 'joda-time:joda-time:2.9.7'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}

关于android - gradle.build文件中的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59700654/

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