Advanced_Android_Development
Advanced_Android_Development copied to clipboard
app/build.gradle correction required
in app/build.gradle file
buildTypes.each { it.buildConfigField 'String', 'OPEN_WEATHER_MAP_API_KEY', MyOpenWeatherMapApiKey
needs to be corrected.
The MyOpenWeatherMapApiKey should be specified within '"key"' i.e, '"actual_key"'
This may not not be an issue, but needs comment or correction in the source code else the buildconfig.Java will throw an error
Alternatively it is possible to define MyOpenWeatherMapApiKey
in a gradle.properties file. For details see Chapter 12. The Build Environment in the gradle documentation.
This is how the variable is defined in the gradle.properties file:
MyOpenWeatherMapApiKey="apikey"
This can be in the gradle.properties file in the project or in the user home folder (e.g. C:\Users\Bob\.gradle\gradle.properties
on Windows).
I totally agree that there should be a comment or some info in the README file.