【问题标题】:Not Showing Developer Services in Project Structure在项目结构中未显示开发人员服务
【发布时间】:2018-09-02 02:13:14
【问题描述】:

在项目结构中未显示开发人员服务。 嗨,目前我正在与 谷歌火力基地 我成功地用firebase添加了我的项目,但是当我需要为firebase客户端添加依赖项时出现问题,但是当我打开我的文件->项目结构时,我得到了这种类型的pf项目结构。

MyProject Strcuture

我无法为 firebase 客户端添加依赖项。

这是我的 build.gardle(项目)

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(模块: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'

我应该如何解决我的问题?

【问题讨论】:

标签: android firebase android-studio


【解决方案1】:

这是因为您试图显示来自Files > Project Structure 的窗口,我想它与当前项目无关。

相反,如果你已经添加了 Firebase 的依赖并且构建成功,在项目上通过Right clickOpen module Settings,然后你应该可以看到Developer Services

开发者服务已从 Android Studio 2.2 及更高版本中删除,这是关于此的链接;

https://stackoverflow.com/a/37704210/4409113

使用Tools > Firebase

【讨论】:

  • 对不起,我仍然得到相同的项目结构
  • 您使用的是哪个版本的 Android Studio?
  • 我使用的是 Android 3.1.4,但在 Tools->FireBase 中没有选项,为什么会这样?
  • 能否请您显示工具栏上方的工具图片?!
  • 您好解决了 Tools->Firebase 和项目结构的问题,但是如何添加他们的依赖项?我在开发人员服务添加、通知、身份验证中有三个选项,但没有云选项
猜你喜欢
  • 2023-03-18
  • 2017-07-30
  • 2019-03-17
  • 1970-01-01
  • 2015-11-09
  • 1970-01-01
  • 2021-03-23
  • 2016-10-01
  • 2020-10-08
相关资源
最近更新 更多