SeTransactionSyncTask:检索帐户时出错 java.lang.IllegalStateException:没有当前的触碰付款帐户
Posted
技术标签:
【中文标题】SeTransactionSyncTask:检索帐户时出错 java.lang.IllegalStateException:没有当前的触碰付款帐户【英文标题】:SeTransactionSyncTask: Error retrieving account java.lang.IllegalStateException: No current tap-and-pay account 【发布时间】:2018-11-12 02:58:15 【问题描述】:我使用 Firebase 开发一个安卓应用。 并正在制作一个帖子系统。因此,使用这些代码,我想单击 Firebase RecyclerView 中的每个项目。
我已将代码更改为制作可点击的项目。
变化如下。
之前,
@Override
protected void onStart()
super.onStart();
final Query DBquery = FirebaseDatabase.getInstance().getReference().child("post").orderByChild("count");
FirebaseRecyclerAdapter<Post, PostViewHolder> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Post, PostViewHolder>(
Post.class,
R.layout.post_row,
PostViewHolder.class,
DBquery
mDatabase
)
@Override
protected void populateViewHolder(PostViewHolder viewHolder, Post model, int position)
viewHolder.setTitle(model.getTitle());
viewHolder.setDesc(model.getDesc());
viewHolder.setImage(getApplicationContext(), model.getImage());
viewHolder.setDate(model.getDate());
;
mPostList.setAdapter(firebaseRecyclerAdapter);
public static class PostViewHolder extends RecyclerView.ViewHolder
View mView;
public PostViewHolder(View itemView)
super(itemView);
mView = itemView;
public void setTitle(String title)
TextView post_title = mView.findViewById(R.id.post_title);
post_title.setText(title);
public void setDesc(String desc)
TextView post_desc = mView.findViewById(R.id.post_desc);
post_desc.setText(desc);
public void setImage(Context ctx, String image)
ImageView post_image = mView.findViewById(R.id.post_image);
Picasso.get().load(image).into(post_image);
public void setDate(String date)
TextView post_date = mView.findViewById(R.id.post_date);
post_date.setText(date);
之后,
@Overried
protected void onStart()
super.onStart();
final Query DBquery = FirebaseDatabase.getInstance().getReference().child("post").orderByChild("count");
FirebaseRecyclerOptions<Post> options = new FirebaseRecyclerOptions.Builder<Post>()
.setQuery(DBquery, Post.class)
.build();
final FirebaseRecyclerAdapter<Post, PostViewHolder> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Post, PostViewHolder>(options)
@NonNull
@Override
public PostViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.post_row, parent, false);
return new PostViewHolder(view);
@Override
public void onBindViewHolder(@NonNull PostViewHolder holder, int position, Post model)
super.onBindViewHolder(holder, position);
holder.setTitle(model.getTitle());
holder.setDesc(model.getDesc());
holder.setImage(getApplication(), model.getImage());
holder.setDate(model.getDate());
;
mPostList.setAdapter(firebaseRecyclerAdapter);
public static class PostViewHolder extends RecyclerView.ViewHolder
View mView;
public PostViewHolder(View itemView)
super(itemView);
mView = itemView;
public void setTitle(String title)
TextView post_title = mView.findViewById(R.id.post_title);
post_title.setText(title);
public void setDesc(String desc)
TextView post_desc = mView.findViewById(R.id.post_desc);
post_desc.setText(desc);
public void setImage(Context ctx, String image)
ImageView post_image = mView.findViewById(R.id.post_image);
Picasso.get().load(image).into(post_image);
public void setDate(String date)
TextView post_date = mView.findViewById(R.id.post_date);
post_date.setText(date);
但是我收到了这个错误。实际上我对这个问题一无所知。
下面的构建错误
Program type already present:
android.arch.lifecycle.LiveData$LifecycleBoundObserver
Messagekind=ERROR, text=Program type already present:
android.arch.lifecycle.LiveData$LifecycleBoundObserver, sources=[Unknown
source file], tool name=Optional.of(D8)
LogCat 错误如下
06-01 23:45:06.261 1959-3666/? E/SeTransactionSyncTask: Error retrieving account
java.lang.IllegalStateException: No current tap-and-pay account
at alty.b(:com.google.android.gms@12685026@12.6.85 (040700-197041431):3)
at alty.a(:com.google.android.gms@12685026@12.6.85 (040700-197041431):1)
at amnv.a(:com.google.android.gms@12685026@12.6.85 (040700-197041431):28)
at com.google.android.gms.tapandpay.gcmtask.TapAndPayGcmTaskChimeraService.b(:com.google.android.gms@12685026@12.6.85 (040700-197041431):1)
at com.google.android.gms.tapandpay.gcmtask.TapAndPayGcmTaskChimeraService.a(:com.google.android.gms@12685026@12.6.85 (040700-197041431):1)
at com.google.android.gms.tapandpay.phenotype.PhenotypeCommitIntentOperation.onHandleIntent(:com.google.android.gms@12685026@12.6.85 (040700-197041431):47)
at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms@12685026@12.6.85 (040700-197041431):2)
at dbn.a(:com.google.android.gms@12685026@12.6.85 (040700-197041431):8)
at nam.a(:com.google.android.gms@12685026@12.6.85 (040700-197041431):9)
at dbs.run(:com.google.android.gms@12685026@12.6.85 (040700-197041431):10)
at dbp.run(:com.google.android.gms@12685026@12.6.85 (040700-197041431):9)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
【问题讨论】:
No current tap-and-pay account
... 我在您的问题中没有看到任何 Google Pay 代码
我也收到了。我使用 Firebase Cloud 消息传递和 Crashlytics。不知道是什么原因造成的。
@Noder 这个问题目前有什么进展吗?
@Noder ,我在配置 firebase auth 后也有同样的问题,请更新您的解决方案。谢谢
也许这听起来很奇怪,但我不得不切换到另一个网络......但我不知道确切原因
【参考方案1】:
我面临类似的问题。但是,当我打开 logcat 并选择选项(在 logcat 屏幕的右上角)“仅显示选定的应用程序”时,没有显示错误。对我来说,似乎错误对应用程序没有影响,无论有没有错误,应用程序都可以正常工作。我使用 google sheet api 在应用程序中读取/写入数据,但支付不是应用程序的一部分。
【讨论】:
以上是关于SeTransactionSyncTask:检索帐户时出错 java.lang.IllegalStateException:没有当前的触碰付款帐户的主要内容,如果未能解决你的问题,请参考以下文章