How can I access a BuildConfig value in my AndroidManifest.xml file?

Replace

buildConfigField "long", "FACEBOOK_APP_ID", FACEBOOK_APP_ID

with

resValue "string", "FACEBOOK_APP_ID", FACEBOOK_APP_ID

then rebuild your project (Android Studio -> Build -> Rebuild Project).

The two commands both produce generated values – consisting of Java constants in the first case, and Android resources in the second – during project builds, but the second method will generate a string resource value that can be accessed using the @string/FACEBOOK_APP_ID syntax. This means it can be used in the manifest as well as in code.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)