Commit
- Loading branch information
There are no files selected for viewing
14 comments
on commit d082c15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please I have an error with 'OPEN_WEATHER_MAP_API_KEY'
why it cannot resolve this symbol ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look out for the file where you are mentioning the API Key random string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can not resolve symbol 'OPEN_WEATHER_MAP_API_KEY'
how can i solve it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot resolve symbol 'OPEN_WEATHER_MAP_API_KEY'
how can i solve it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrizwan2018 @AmrHussien have you added your key in your .gradle folder in your home?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the MyOpenWeatherMapApiKey supposed to be our personal key that we get from the weather website?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My build.gradle file gives error when I try and sync it once I've added the key in:
Error:Cause: failed to find target with hash string 'android-21' in: C:\Users\Parth\AppData\Local\Android\sdk
Open Android SDK Manager
Am I doing something wrong?
UPDATE: I changed the version numbers to my current SDK version and now I get this error: Error:(27, 13) Failed to resolve: com.android.support:appcompat-v7:23.0.3
Install Repository and sync project
Show in File
Show in Project Structure dialog
The install doesn't seem to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sinapse87 how can I do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace MyOpenWeatherMapApiKey with your openweather API key. for example, if your key is 1111111, put ""1111111"" there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EConroyd yeah, you are right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MyOpenWeatherMapApiKey
defines in which file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if your id is 111 , you should add buildConfigField "String", "OPEN_WEATHER_MAP_API_KEY", ""111""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For those of you who are having problems with the OPEN_WEATHER_MAP_API_KEY, follow these steps:
1- Go to http://openweathermap.org/ and sign up or sign in.
2- Create your own API key in your account page.
3- Copy your API key and open your app build.gradle file in android studio.
4- Copy these lines:
buildTypes.each {
it.buildConfigField 'String', 'OPEN_WEATHER_MAP_API_KEY', ""YOUR_KEY_HERE""
}
5- Make sure to include the backslash before each of the inner double quotes for your key to be parsed successfully. (I've included them for you, just copy and paste.)
That's it!
Error:Cause: failed to find target with hash string 'android-21' in: C:\Users\Parth\AppData\Local\Android\sdk
Open Android SDK Manager