【发布时间】:2022-01-13 07:09:50
【问题描述】:
我正在尝试学习使用 android studio 创建 android 应用程序
应用程序是空白的,除非主 Activity,否则还没有页面
我在 firebase 上做了项目并输入了名称 (com.example.connect)
然后我将 jason 文件添加到应用程序位置,然后我做了所有事情
但是当我点击连接时仍然会弹出这个错误
(无法解析 Android 应用程序模块的 Gradle 配置。解决 gradle 构建问题和/或重新同步)
每当我观看解决此问题的视频时,都可以解决我的问题! 我能做什么?
构建 gradle APP
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "RUVOLT"
include ':app'
构建 gradle 模块
plugins {
id 'com.android.application'
id 'com.google.firebase.crashlytics'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.ruvolt"
minSdk 19
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation 'com.google.firebase:firebase-analytics:20.0.2'
implementation platform('com.google.firebase:firebase-bom:29.0.3')
implementation 'com.google.firebase:firebase-analytics'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'com.google.firebase:firebase-crashlytics:18.2.6'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
【问题讨论】:
标签: javascript android firebase gradle