android - Error:(12, 32) error: attribute value must be constant when declaring String for toast for ACRA toast -
i'm trying introduce acra lib in library project. when set string toast, "attribute value must constant" error. please see attached screen-shots 
and r.string.crash_toast_text: 
please note these lines of code here
https://github.com/acra/acra/wiki/advancedusage#toast-notification
based on commonsware 18 answer, made work. here sample code if gets stuck in same situation:
final acraconfiguration config = acra.getnewdefaultconfig(this); try { config.setmode(reportinginteractionmode.toast); } catch (acraconfigurationexception e) { e.printstacktrace(); } config.setrestoasttext(r.string.crash_toast_text); acra.init(this, config);
Comments
Post a Comment