-1
.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {

    Uri downloadUrl = taskSnapshot.getDownloadUrl();
    }
});

Error TaskSnapshot - Method should only be accessed within private scope while using android studio 2.3.

AL.
  • 36,815
  • 10
  • 142
  • 281
  • 1
    Hi there, I just read this question and a one time google search has given me [your answer](http://stackoverflow.com/q/41105586/4112725). Anyway, welcome to StackOverflow :D – koceeng Mar 21 '17 at 11:35

1 Answers1

4

It seems to be a bug, maybe it will be fixed in the next version. In the mean time, try this:

@SuppressWarnings("VisibleForTests") Uri downloadUrl = taskSnapshot.getDownloadUrl();
Léslio
  • 59
  • 6