safaricom/LNMOnlineAndroidSample

Runtime errors

Closed this issue · 5 comments

error: self-reference in initializer
This is the error I get when I try running the app
no

I'm having this issue too.I'm yet to figure it out

The issue is in the following lines of code in the build. gradle app module
buildTypes.each { it.buildConfigField 'String', 'CONSUMER_KEY', 'CONSUMER_KEY' it.buildConfigField 'String', 'CONSUMER_SECRET', 'CONSUMER_SECRET' }

Change the parameter values according to the values given in the Safaricom developers site

IMPORTANT

If you are setting a new String variable, you should use the \" to set the quotation marks to your new variable. So, if I'm setting a String, I should modify the PARAM_VALUE to "\"My String\"" . This way, when gradle sets your String variable, it will set the quotation marks too.

Hope that helps.

@kelvinmarshall the issue is referenced here https://stackoverflow.com/questions/30796533/how-to-generate-buildconfigfield-with-string-type , thank you for the fix

Thank You