Muy buenas, estoy accediendo a la lista de contactos al pulsar un boton, para seleccionar el contacto al que se quiere mandar un SMS. Mi codigo es el siguiente
findViewById(R.id.get_contacts).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getApplicationContext(), ContactPickerActivity.class)
.putExtra(ContactPickerActivity.EXTRA_THEME, "dark")
.putExtra(ContactPickerActivity.EXTRA_CONTACT_BADGE_TYPE,
ContactPictureType.ROUND.name())
.putExtra(ContactPickerActivity.EXTRA_CONTACT_DESCRIPTION,
ContactDescription.ADDRESS.name())
.putExtra(ContactPickerActivity.EXTRA_CONTACT_DESCRIPTION_TYPE,
ContactsContract.CommonDataKinds.Email.TYPE_WORK)
.putExtra(ContactPickerActivity.EXTRA_CONTACT_SORT_ORDER,
ContactSortOrder.AUTOMATIC.name());
// Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(intent, REQUEST_CONTACT);
}
});
Mientras estoy en la opción de desarrollo (Build Variant = Debug) esto me funciona perfectamente, pero cuando paso a produccion (Build Variant = Release) da error:
Fatal Exception: java.lang.RuntimeException: Unable to resume activity {com.martruchagr.bloquearllamadas/com.onegravity.contactpicker.core.ContactPickerActivity}: org.greenrobot.eventbus.e: Subscriber class com.onegravity.contactpicker.core.ContactPickerActivity and its super classes have no public methods with the @Subscribe annotation
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3103)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
at android.app.ActivityThread.access$900(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by org.greenrobot.eventbus.e: Subscriber class com.onegravity.contactpicker.core.ContactPickerActivity and its super classes have no public methods with the @Subscribe annotation
at org.greenrobot.eventbus.SubscriberMethodFinder.findSubscriberMethods(Unknown Source)
at org.greenrobot.eventbus.EventBus.getDefault(Unknown Source)
at com.onegravity.contactpicker.core.ContactPickerActivity.onResume(Unknown Source)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1259)
at android.app.Activity.performResume(Activity.java:6361)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3092)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
at android.app.ActivityThread.access$900(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
No encuentro el por qué. Podríais echarme una mano.
Muchas gracias