Home Ask Login Register

Developers Planet

Your answer is one click away!

Adrian Antal February 2016

Error:(12, 32) error: attribute value must be constant when declaring String for toast for ACRA toast

I'm trying to introduce the ACRA lib in my library project. When I set up the String for the toast, I get a "Attribute value must be a constant" error. Please see attached screen-shots enter image description here

and the R.string.crash_toast_text: enter image description here

Please note that these lines of code are from here



Adrian Antal February 2016

Based on CommonsWare 18 answer, I made it work. Here is a sample code if anyone gets stuck in the same situation:

 final ACRAConfiguration config = ACRA.getNewDefaultConfig(this);

    try {
    } catch (ACRAConfigurationException e) {

    ACRA.init(this, config);

Post Status

Asked in February 2016
Viewed 1,776 times
Voted 5
Answered 1 times


Leave an answer

Quote of the day: live life