2

I am posting some events and subscribed code works properly on debug apk but same code crashes when I sign apk with my keystore and install the app.

java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.example.friendz/com.example.friendz.shivaraj.activities.MainActivity}: 
a.a.a.h: Subscriber class com.example.friendz.shivaraj.activities.MainActivity
 and its super classes have no public methods with the @Subscribe annotation

But my main activity has Subscribers with @Subscribe defined

I have this subscriber in my activity

@Subscribe
public void updateLocationEvent(String isStartLoc) {
    Log.d("eventbuus", "stop event rcvd");
 if (isStartLoc.equals("start")) {
    startLocationUpdates();
 } else {
    stopLocationUpdates();
 }
}

And I am registering & unregistering like this

@Override
protected void onStart() {
    super.onStart();
    mGoogleApiClient.connect();
    EventBus.getDefault().register(this);
}

@Override
protected void onStop() {
    super.onStop();
    EventBus.getDefault().unregister(this);
}    
Shivaraj Patil
  • 8,186
  • 4
  • 29
  • 56
  • Maybe try wrapping the `String` in your own custom POJO. (make a simple class with 1 field of type String with a getter). See if it makes a difference. – Vucko Jul 25 '16 at 18:38

0 Answers0