質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Q&A

解決済

1回答

388閲覧

Firebaseを導入したい

fm311_engineer

総合スコア7

Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

0グッド

0クリップ

投稿2017/10/23 12:22

Firebaseを導入しようとしていたのですが、このようなエラーが発生します。
Google Play Service と Google Repository は最新っぽいのですが…
パッケージ名のみ編集させていただいてます。

Gradleの同期でエラー発生

1エラー:(39, 13) Failed to resolve: com.google.firebase:firebase-perf:11.4.0
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath 'com.google.gms:google-services:3.0.0' classpath 'com.google.firebase:firebase-plugins:1.1.1' } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
apply plugin: 'com.android.application' apply plugin: 'com.google.firebase.firebase-perf' android { compileSdkVersion 26 buildToolsVersion "26.0.1" defaultConfig { applicationId 'com.sample.application' minSdkVersion 21 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } productFlavors { } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) // compile 'com.android.support:design:25.3.1' compile 'com.android.support:appcompat-v7:26.+' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.google.code.gson:gson:2.7' compile 'com.neovisionaries:nv-websocket-client:2.3' compile 'com.google.firebase:firebase-messaging:10.0.1' compile 'com.google.firebase:firebase-core:10.0.1' compile 'com.google.firebase:firebase-ads:10.0.1' // compile 'com.google.firebase:firebase-ads:11.2.0' 11.2.0 を使おうとすると「Failed to resolve」発生。上の行の 10.0.1 だとOK compile 'com.google.firebase:firebase-crash:10.0.1' compile 'com.google.firebase:firebase-perf:11.4.0' // エラー発生箇所 testCompile 'junit:junit:4.12' } apply plugin: 'com.google.gms.google-services'

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

こちらの公式サイトに、以下のように書いてあります。他のfirebaseのサービスも11.4.0に上げてみては如何でしょう?

アプリで他の Firebase SDK を使用している場合は、SDK のバージョンも 11.4.0 に変更する必要があります


追記
こちらのスタックオーバーフローによると、以下の記述を入れる必要があるようです

allprojects { repositories { jcenter() maven { url "https://maven.google.com" } } }

投稿2017/10/23 13:14

編集2017/10/23 13:54
hiramekun

総合スコア428

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

fm311_engineer

2017/10/23 13:39

エラー:(35, 13) Failed to resolve: com.google.firebase:firebase-core:11.4.0 エラー:(34, 13) Failed to resolve: com.google.firebase:firebase-messaging:11.4.0 エラー:(36, 13) Failed to resolve: com.google.firebase:firebase-ads:11.4.0 エラー:(38, 13) Failed to resolve: com.google.firebase:firebase-crash:11.4.0 エラー:(39, 13) Failed to resolve: com.google.firebase:firebase-perf:11.4.0 エラーが増えてしまいます。 最新版を使いたいんですけどね… https://firebase.google.com/docs/android/setup?hl=ja#available_libraries
hiramekun

2017/10/23 13:54

編集したので、そちらを試してみてください
fm311_engineer

2017/10/23 14:00

おかげさまでできました。 公式のドキュメントにはなかったと思いますが… ありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問