In my app I am using GCM for push notification, we have to set 2 permission tags in the manifest of whose value I am picking up from string xml
<uses-permission android:name="@string/app_gcm_permission" />
<permission
android:name="@string/app_gcm_permission"
android:protectionLevel="signature" />
In the string file
<string name="app_gcm_permission">com.lift.chi.permission.C2D_MESSAGE</string>
The gradle build is successful and when I try to run the app I get the below error
error: invalid Java identifier '@string/app_gcm_permission'.
Message{kind=ERROR, text=error: invalid Java identifier '@string/app_gcm_permission'
This is happening because android studio internally converts dot to underscore due to which it throws the invalid java identifier error. Please don't give me solutions to add the permission directly in manifest rather than picking from string file.
How can I resolve this??