I've been trying to use Firebase's storage libraries to attempt to upload a file using Google's sample code in Android Studio:
FirebaseStorage storage = FirebaseStorage.getInstance();
StorageReference storageRef = storage.getReferenceFromUrl("gs://<your-bucket-name>");
UUID imageID = UUID.randomUUID();
StorageReference pendingImageRef = storageRef.child("products/images/"+imageID);
UploadTask uploadTask = pendingImageRef.putBytes(imageData);
....
Which gave me this:
java.lang.NoClassDefFoundError:
Failed resolution of: Lcom/google/firebase/storage/FirebaseStorage;
at com.myprogram.CreateProductFragment$1.onClick(CreateProductFragment.java:304)
at android.view.View.performClick(View.java:4785)
at android.view.View$PerformClick.run(View.java:19884)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:702)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.storage.FirebaseStorage" on path: ....
My thinking was that this was an issue with dexing, so I rejiggered it and multidexed the application. This did not eliminate the issue.