【发布时间】:2020-10-19 20:34:03
【问题描述】:
我已经导入了模块(多个项目)。 导入它们后同步很完美,但是当尝试运行应用程序时,它显示了这个错误 error
这是我的 build.gradle 文件:
应用插件:'com.android.application' 应用插件:'com.google.gms.google-services'
机器人{ compileSdkVersion 29 buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.secondyr"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
依赖{ 实现 fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-database:19.3.1'
implementation 'com.google.firebase:firebase-storage:19.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation project(path: ':SecondYearCivil')
implementation project(path: ':SecondYearCs')
implementation project(path: ':SecondYearElectronics')
implementation project(path: ':SecondYearElectronicsandTelecom')
implementation project(path: ':SecondYearProd')
implementation project(path: ':SecondYearMech')
implementation project(path: ':SecondYearTextile')
implementation project(path: ':SecondYearIT')
implementation project(path: ':SecondYearETC')
}
我在 stackoverflow 上看到过类似的问题,但我不明白。 我读到了这个解决方案,将 .json 文件中的包名更改为 manisfest 中的包名,我不明白要更改哪一个,因为有很多包名
【问题讨论】:
-
如果您使用的是 firebase ,请确保您已将 firebase 生成的 gson 服务文件添加到您的项目中