0

I have my Android Studio project and want to add Gson to it. I added implementation 'com.google.code.gson:gson:2.8.7' to my build.gradle so it looks like the following:

dependencies {

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
    implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
    implementation 'androidx.navigation:navigation-fragment:2.3.0'
    implementation 'androidx.navigation:navigation-ui:2.3.0'
    implementation 'com.google.code.gson:gson:2.8.7'

    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

Then re-synced. Then reloaded from disk. Finally, Invalidate Cache and Restart. Then blasted the .idea directory and reloaded. Nothing has allowed this to show up for import.

Haven't changed the root build.gradle, so it still has the right repositories. Now stuck.

It's been a while since I've done an Android project and I don't know what to try next.

Thom
  • 14,013
  • 25
  • 105
  • 185

0 Answers0