Первый раз с этим сталкиваюсь.
2019-12-07 19:02:01.884 28467-28604/? E/Auth: [GoogleAccountDataServiceImpl] getToken() -> BAD_AUTHENTICATION. Account: <ELLIDED:2041731518>, App: com.android.vending, Service: oauth2:https://www.googleapis.com/auth/googleplay
sbj: Long live credential not available.
at hbz.a(:com.google.android.gms@19829028@19.8.29 (100400-282600551):156)
at jbx.a(:com.google.android.gms@19829028@19.8.29 (100400-282600551):94)
at jay.a(Unknown Source:2)
at jbs.a(:com.google.android.gms@19829028@19.8.29 (100400-282600551):19)
at jbs.a(:com.google.android.gms@19829028@19.8.29 (100400-282600551):11)
at gyg.a(:com.google.android.gms@19829028@19.8.29 (100400-282600551):36)
at gyg.a(:com.google.android.gms@19829028@19.8.29 (100400-282600551):150)
at hap.getAuthToken(:com.google.android.gms@19829028@19.8.29 (100400-282600551):22)
at android.accounts.AbstractAccountAuthenticator$Transport.getAuthToken(AbstractAccountAuthenticator.java:247)
at android.accounts.IAccountAuthenticator$Stub.onTransact(IAccountAuthenticator.java:114)
at android.os.Binder.transact(Binder.java:675)
at dvb.onTransact(:com.google.android.gms@19829028@19.8.29 (100400-282600551):2)
at android.os.Binder.transact(Binder.java:675)
at aaqq.onTransact(:com.google.android.gms@19829028@19.8.29 (100400-282600551):29)
at android.os.Binder.execTransact(Binder.java:739)
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Adapter;
import android.widget.TextView;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.ChildEventListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.p0001.aplaxtesters.Authorization.Login;
import java.util.ArrayList;
import java.util.List;
public class User extends Fragment {
private TextView name, age, position, inProject;
private String nameString, positionString, inProjectString;
private long ageLong;
private DatabaseReference mDatabase, dataReference, bugsReference;
private FirebaseUser firebaseUser;
private FirebaseAuth mAuth;
private RecyclerView bugsRecycler;
private List<BugModel> bugs;
private BugsAdapter bugsAdapter;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View inflate = inflater.inflate(R.layout.fragment_user, container, false);
mDatabase = FirebaseDatabase.getInstance().getReference();
firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
dataReference = FirebaseDatabase.getInstance().getReference("users");
bugsReference = FirebaseDatabase.getInstance().getReference("users").child(firebaseUser.getUid()).child("bugs");
mAuth = FirebaseAuth.getInstance();
name = inflate.findViewById(R.id.name);
position = inflate.findViewById(R.id.position);
inProject = inflate.findViewById(R.id.inProject);
age = inflate.findViewById(R.id.age);
bugsRecycler = inflate.findViewById(R.id.bugs);
bugs = new ArrayList<>();
bugsRecycler.setHasFixedSize(true);
LinearLayoutManager llm = new LinearLayoutManager(getContext());
llm.setOrientation(LinearLayoutManager.VERTICAL);
bugsRecycler.setLayoutManager(llm);
bugsAdapter = new BugsAdapter(bugs);
bugsRecycler.setAdapter(bugsAdapter);
bugs();
dataReference.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
nameString = dataSnapshot.child(firebaseUser.getUid()).child("name").getValue(String.class);
positionString = dataSnapshot.child(firebaseUser.getUid()).child("position").getValue(String.class);
inProjectString = dataSnapshot.child(firebaseUser.getUid()).child("inProject").getValue(String.class);
ageLong = dataSnapshot.child(firebaseUser.getUid()).child("age").getValue(Long.class);
name.setText(nameString);
position.setText(positionString);
age.setText(ageLong + " лет");
inProject.setText("В проекте с " + inProjectString);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
return inflate;
}
private void bugs() {
bugsReference.addChildEventListener(new ChildEventListener() {
@Override
public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
bugs.add(dataSnapshot.getValue(BugModel.class));
bugsAdapter.notifyDataSetChanged();
}
@Override
public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
}
@Override
public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {
}
@Override
public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
}