Reputation: 3352
Android Studio is giving me a compile error, and I have no idea why. 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?
Upvotes: 0
Views: 445