【问题标题】:Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync无法解析 Android 应用程序模块的 Gradle 配置。解决 gradle 构建问题和/或重新同步
【发布时间】:2020-10-12 09:21:42
【问题描述】:

我刚刚完成了我的 android studio 项目的设置,但我在连接到 firebase 时遇到了问题,我已经尝试了针对类似问题提出的所有解决方案,但这些建议的解决方案都不适合我。我现在不知道该怎么做。这是我的 build.grade(模块应用和项目脚本)

apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
    applicationId "za.gov.mtubatuba.www.mtubayouthbase"
    minSdkVersion 15
    targetSdkVersion 30
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/CircleImageView-master/gradle/wrapper/gradle-wrapper.jar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
String googleSupportVersion = '28.0.0'
//noinspection GradleCompatible
implementation "com.android.support:support-v4:$googleSupportVersion"
//noinspection GradleCompatible
implementation "com.android.support:appcompat-v7:$googleSupportVersion"
//noinspection GradleCompatible
implementation "com.android.support:design:$googleSupportVersion"
//noinspection GradleCompatible
implementation "com.android.support:recyclerview-v7:$googleSupportVersion"
//noinspection GradleCompatible
implementation "com.android.support:support-vector-drawable:$googleSupportVersion"


implementation('com.android.support:multidex:1.0.1') { force = true; }
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'de.hdodenhof:circleimageview:2.1.0'
//noinspection GradleCompatible
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.iceteck.silicompressorr:silicompressor:2.1'
implementation 'id.zelory:compressor:2.1.0'
implementation 'com.squareup.okhttp:okhttp:2.5.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

还有我的 build.gradle(project)

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


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


allprojects {
repositories {
    jcenter()
    maven{
        url 'https://maven.fabric.io/public'
    }
    google()
}
}

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

【问题讨论】:

    标签: android firebase android-studio firebase-realtime-database


    【解决方案1】:

    现在一切都整理好了。对我有用的是将我的 gradle 脚本上的编译更改为实现,然后将其连接到 firebase

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-01-23
      • 2023-03-26
      • 1970-01-01
      • 2022-07-17
      • 1970-01-01
      • 1970-01-01
      • 2021-11-01
      相关资源
      最近更新 更多