Credit to @Grsmto
As per this blog post you need to open a terminal and launch the following commands sequentially:
UPDATE
Now the workaround it’s easier, you just need to go to Build -> Clean Project and then sync.
Windows
gradlew clean
gradlew assemble
Linux/Mac
./gradlew clean
./gradlew assemble
then sync the project.
More Related Contents:
- Android Gradle plugin 0.7.0: “duplicate files during packaging of APK”
- “No cached version… available for offline mode.”
- Android- Error:Execution failed for task ‘:app:transformClassesWithDexForRelease’
- How to configure gradle to work “offline” (using cached dependencies)
- “Gradle Version 2.10 is required.” Error
- How do I show dependencies tree in Android Studio?
- Android Studio: Gradle – build fails — Execution failed for task ‘:dexDebug’
- Android Studio how to package single AAR from multiple library projects?
- Android Gradle Apache HttpClient does not exist?
- Android Studio: Gradle sync failed: Could not HEAD ‘…’. Received status code 502 from server: Bad Gateway [closed]
- Duplicate files copied (Android Studio 0.4.0) [duplicate]
- How to create an Android Library Jar with gradle without publicly revealing source code?
- how can I add the aidl file to Android studio (from the in-app billing example)
- Android Studio Gradle issue upgrading to version 0.5.0 – Gradle Migrating From 0.8 to 0.9 – Also Android Studio upgrade to 0.8.1
- Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml
- How to automatically uninstall android app from device before installing a new version
- Upgraded to Android studio 3.4 – Aapt2InternalException: AAPT2: Daemon startup failed
- no cached version available for offline mode
- Gradle Duplicate Entry: java.util.zip.ZipException
- How to include a library module dependency in an Android Studio project?
- Unable to resolve dependency for ‘:app@debug/compileClasspath’: Could not resolve com.android.support:appcompat-v7:26.1.0
- Configuration with name ‘default’ not found. Android Studio
- Android Studio: how to generate signed APK using Gradle?
- How to set up gradle and android studio to do release build?
- Android Studio and Gradle build error
- Android Gradle DexException: Multiple dex files define Lorg/hamcrest/Description
- After update android studio could not create parent directory for lock file
- Could not find property ‘outputFile’ on com.android.build.gradle.internal.api.ApplicationVariantImpl
- Can an AAR include transitive dependencies? [duplicate]
- Android build gradle is too slow (Dependency Resolution)