gpt4 book ai didi

java - Android Studio 不允许我 "Install repository and sync project"

转载 作者:太空宇宙 更新时间:2023-11-04 11:14:43 28 4
gpt4 key购买 nike

我尝试安装 FirebaseUI,但现在出现此 gradle 错误。我尝试安装 gradle 在 build.gradle 文件中告诉我的库,但 Android Studio 给了我这个错误,并且不允许我按“安装存储库和同步项目”。

Error given by gradle

这是我的 build.gradle 文件

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

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

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.avantefg.avante"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs {
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
}
}
productFlavors {
}
}

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.digits.sdk.android:digits:2.0.2@aar') {
transitive = true;
}
compile('com.mikepenz:materialdrawer:5.8.0@aar') {
transitive = true
}
dependencies {
compile 'com.getbase:floatingactionbutton:1.10.1'
}
//Lollipin
compile('com.github.orangegangsters:lollipin:2.0.0@aar') {
transitive = true
}
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true;
}

compile 'com.google.gms:google-services:3.1.0'
compile 'com.wang.avi:library:2.1.3'
compile 'jp.wasabeef:blurry:2.0.3'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.firebaseui:firebase-ui-auth:2.2.0'
compile 'io.github.yuweiguocn:SquareLoading:1.3.0'

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.constraint:constraint-layout:1.0.0-beta4'
compile 'com.android.support:customtabs:25.3.1'



compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.cocosw:bottomsheet:1.+@aar'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'com.github.barteksc:android-pdf-viewer:2.7.0-beta.1'
compile 'com.android.volley:volley:1.0.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
}

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

这是项目 build.grade 文件

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'io.fabric.tools:gradle:1.+'
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 {
maven{
url "https://github.com/omadahealth/omada-nexus/raw/master/release"
}
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

请有人帮助我!

最佳答案

最近,Google 开始通过 maven repo 分发 Android 支持库。

您可以尝试添加

maven { url 'https://maven.google.com' }

在您的项目级别 build.gradle

示例:

buildscript {
ext.kotlin_version = '1.1.3-2'
repositories {
maven { url 'https://maven.google.com' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha9'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
mavenCentral()
maven { url 'http://devrepo.kakao.com:8088/nexus/content/groups/public/'
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

关于java - Android Studio 不允许我 "Install repository and sync project",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45604133/

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