[英]Android Studio Not Recognizing Method
Android Studio is giving me a compile error, and I have no idea why. Android Studio给我一个编译错误,我也不知道为什么。 I was working on the app with no issues, now it is saying that one of my methods is never used:
我当时正在开发应用程序,没有任何问题,现在是说从未使用过我的一种方法:
I have created the method and was compiling the app no problem just minutes before. 我已经创建了方法,并且几分钟前就可以编译应用程序了。 The method is now greyed out as well:
该方法现在也显示为灰色:
private void increasePollTotalVoteCounter(int checkedRadioButtonID) {
mRefAtPollIndexImmediatelyBelowDate.child(VOTE_COUNT_LABEL).runTransaction(new Transaction.Handler() {
@Override
public Transaction.Result doTransaction(MutableData mutableData) {
mutableData.setValue((Long) mutableData.getValue() + 1);
return Transaction.success(mutableData);
}
@Override
public void onComplete(FirebaseError firebaseError, boolean b, DataSnapshot dataSnapshot) {
if (firebaseError != null) {
Toast.makeText(getActivity().getApplicationContext(), firebaseError.getMessage(), Toast.LENGTH_LONG).show();
}
}
});
}
I tried cleaning the project and that approach didn't work either. 我尝试清理项目,但这种方法也不起作用。 Any thoughts?
有什么想法吗?
尝试将您的方法公开而不是私有
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.