Dynamic values are not supported as attributes in annotation- AspectJ Android [AOP Android] -


i using custom annotation log id user clicked. getting error "attribute value must constant". code snippet below.

massetid= asset.getcontentid();    @trackevent("track_event")     @arrayparams({@params(key = "content_id",value = massetid)})     protected void attributemethod() {     } 

thanks in advance. there way pass dynamic values in annotation rather static variables or constants. using aspectj library android.

it's not possible specify runtime values in annotation attributes, constants, , set of possible types limited few types:

primitives, string, class, enums, annotations, , arrays of preceding types

according java 5 language guide - annotations.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -