Cannot resolve symbol c882c94be45fff9d16a1cf845fc16ec5

I am a new developer exploring the world of Android. I am currently working through the Udacity tutorials for creating the Sunshine app. In the fragment activity class in order to get data from openweathermap I must add the API key I got from my account to the end of the generated URL. There is a call to in the Fragment activity (click to see the call to which is on the 6th line as part of String apiKey).

The build.gradle file is as follows:

  • RecyclerView scrolling on insert
  • TabLayout (Android Design Library) Text Color
  • can i edit the text of sign in button on google?
  • Failed to initialize display event receiver
  • is it possible release an updated app by signing it with a different certificate than the one originally used
  • Paho MQTT Android service wake up activity
  • apply plugin: ''
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.1"
        defaultConfig {
            applicationId ""
            minSdkVersion 10
            targetSdkVersion 21
            versionCode 1
            versionName "1.0"
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), ''
        buildTypes.each {
            it.buildConfigField 'String', 'OPEN_WEATHER_MAP_API_KEY', 'c882c94be45fff9d16a1cf845fc16ec5'
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile ''

    in buildTypes.each it.buildConfigField is called with ‘String’, ‘OPEN_WEATHER_MAP_API_KEY’, ‘c882c94be45fff9d16a1cf845fc16ec5’ resulting in

    public static final String OPEN_WEATHER_MAP_API_KEY = c882c94be45fff9d16a1cf845fc16ec5;

    being generated in, however I keep getting this error:
    Cannot Resolve Symbol (click to see error message and file)
    I do not understand why the String OPEN_WEATHER_MAP_API_KEY is automatically being created as just a group of letters and numbers without quotes around them, but if I edit the code to read:

    public static final String OPEN_WEATHER_MAP_API_KEY = "c882c94be45fff9d16a1cf845fc16ec5";


    public static final String OPEN_WEATHER_MAP_API_KEY = 'c882c94be45fff9d16a1cf845fc16ec5';

    the automatically changes itself.
    I am not sure what I am doing wrong and I checked many of the Udacity videos which did not have any information about this issue. Please let me know if you know how to fix this.


    Related posts:

    Using Dropbox API to upload a file with Android
    Delete my application programmatically (Android)
    difference between android looper and executor thread pool
    Piracy, piracy, piracy. What can I do?
    Handling and Mitigating IllegalStateException (“failure saving state: active $Fragment has...
    Mobile app: how to show the OTP my app sends in a popup without leaving my app?
  • Detect proximity using Bluetooth LE “Proximity” profile Android
  • How to wake up Android Wear when it is in sleep mode?
  • Communications link failure Last packet sent to the server was 1 ms ago.
  • Implementing C#-like events in Android/Java
  • Android Studio is slow (how to speed up)?
  • Loader delivers result to wrong fragment
  • 2 Solutions collect form web for “Cannot resolve symbol c882c94be45fff9d16a1cf845fc16ec5”


     buildTypes.each {
         it.buildConfigField 'String', 'OPEN_WEATHER_MAP_API_KEY', 'c882c94be45fff9d16a1cf845fc16ec5'


     buildTypes.each {
         it.buildConfigField 'String', 'OPEN_WEATHER_MAP_API_KEY', "\"c882c94be45fff9d16a1cf845fc16ec5\""

    this way OPEN_WEATHER_MAP_API_KEY should be escaped correctly


    This is the correct syntax for making changes to the BuildTypes container.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.