やりたいこと
firebaseに画像を保存しておき、Androidアプリから取得・表示したい
現状
下記の記事を参考にして実装を進めているのですが、下記のソースを書くとGlideのところが赤くなってしまい画像を表示できません。
https://qiita.com/pongi/items/ee1d5f629467e2f49dec
GlideApp.with(this) .load(imageRef) .into(image_view)
どのようにすれば画像が表示できるのでしょうか?
(GlideModuleのアノテーションは使えているのでbuild.gradleの記載は問題ないと考えております)
追加情報
ご助言いただいた内容をもとに改修したところ、
ビルド時に下記のエラーが出るようになりました。
(エラーはコメントアウトしているfirebaseのimplemantationを使用したときに表示されます)
本件とは別に地図アプリの機能も使用しているため、そちらのほうで出ているようなんですが
解決方法がわからず…
ご存知の方がいらっしゃいましたらご助言いただきたいと思います。
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { compileSdkVersion 28 defaultConfig { applicationId "XXXX" multiDexEnabled true minSdkVersion 19 targetSdkVersion 28 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 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.google.android.gms:play-services:12.0.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" //glide implementation 'com.github.bumptech.glide:glide:4.10.0' kapt 'com.github.bumptech.glide:compiler:4.10.0' //firebase // implementation 'com.google.firebase:firebase-core:17.2.1' // implementation 'com.google.firebase:firebase-storage:19.1.0' // implementation 'com.firebaseui:firebase-ui-storage:4.1.0' } repositories { mavenCentral() } apply plugin: 'com.google.gms.google-services'
以上、よろしくお願いいたします。
あなたの回答
tips
プレビュー