Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Could not find property 'MyOpenWeatherMapApiKey' #289

Open
vivektiwari660 opened this issue Sep 23, 2016 · 3 comments
Open

Could not find property 'MyOpenWeatherMapApiKey' #289

vivektiwari660 opened this issue Sep 23, 2016 · 3 comments

Comments

@vivektiwari660
Copy link

Error:(21, 0) Could not find property 'MyOpenWeatherMapApiKey' on com.android.build.gradle.AppExtension_Decorated@668dd8b9.
Open File

@vivektiwari660
Copy link
Author

Please help me regarding above issue.

@eunalp
Copy link

eunalp commented Sep 23, 2016

Paste this code to your gradle.properties file.
MyOpenWeatherMapApiKey="yourApiKey"

The final code will be;

...
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
MyOpenWeatherMapApiKey="yourApiKey"

Clean your project if any build error occurs.

@azdafirmansyah
Copy link

@vivektiwari660 : try this
buildTypes.each {
it.buildConfigField 'String', 'OPEN_WEATHER_MAP_KEY', ""YourApiKey""
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants