未在项目结构中显示开发人员服务。 嗨,目前我正在与 GoogleFirebase 并且我成功地用firebase添加了我的项目,但是当我需要为firebase客户端添加依赖项时出现了问题,但是当我打开File-> project Structure时,却得到了这种类型的pf项目结构。
我无法为Firebase客户端添加依赖项。
这是我的 build.gardle(Project)
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
这是我的 build.gardle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.amk52.mymusic"
minSdkVersion 21
targetSdkVersion 27
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:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui:4.0.1'
}
apply plugin: 'com.google.gms.google-services'
我应该如何解决我的问题?
答案 0 :(得分:0)
这是因为您要显示Files > Project Structure
中的窗口,它与我想的当前项目无关。
相反,如果您已经添加了Firebase的依赖项,并且构建成功,则在项目Right click
上进行Open module Settings
,然后您应该可以看到Developer Services
:< / p>
开发者服务已从Android Studio 2.2及更高版本中删除,这是关于此的链接;
https://stackoverflow.com/a/37704210/4409113
使用Tools > Firebase