我想从Firebase存储中加载我的图像 我未对公开开放的Firebase存储规则通过任何身份验证。 我遵循了Glide lib的最新指南。 我面临着更多的问题,一个是身份验证问题,另一个是将存储引用传递给我的Glide加载方法。
storage=FirebaseStorage.getInstance();
StorageReference storageRef =storage.getReference();
StorageReference pathRef = storageRef.child("logos/lulu.jpg");
StorageReference imageRef=storage.getReference().child("logos/lulu.jpg");
// StorageReference httpsRef =storage.getReferenceFromUrl("https://firebasestorage.googleapis.com/v0/b/mostafa-7e438.appspot.com/o/logos%20lulu.jpg");
// String url = httpsRef.getPath();
// StorageReference imagesRef = storageRef.child("logos/lulu.jpg");
Img=(ImageView)findViewById(R.id.imgArr);
Glide.with(this).load(imageRef).into(Img);
和我的依赖项
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.android.gms:play-services-maps:10.0.0'
implementation 'com.android.support:design:27.0.3'
implementation 'com.google.firebase:firebase-messaging:10.0.0'
implementation 'com.google.firebase:firebase-database:10.0.0'
implementation 'com.google.firebase:firebase-storage:10.0.0'
implementation 'com.google.firebase:firebase-auth:10.0.0'
implementation 'com.firebaseui:firebase-ui-database:4.1.0'
implementation 'com.firebaseui:firebase-ui-storage:4.1.0'
implementation 'com.firebaseui:firebase-ui-firestore:4.1.0'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'com.google.firebase:firebase-ads:10.0.0'
implementation 'com.google.firebase:firebase-core:10.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support:multidex:1.0.3'
testImplementation 'junit:junit:4.12'
而logcat是
W/NetworkRequest: no auth token for request