“No cached version… available for offline mode.”

Had the same error after updating Android Studio today. For me, it wasn’t a matter of proxy settings: Uncheck “Offline work” in Android Studio 0.6.0: File->Settings->Gradle->Global Gradle Settings or in OSX: Preferences->Gradle->Global Gradle Setting or in more recent versions: File->Settings->Build, Execution, Deployment->Build tools->Gradle Resync the project, for example by restarting the Android Studio Once synced, … Read more

Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’

Just correct Google play services dependencies: You are including all play services in your project. Only add those you want. For example , if you are using only maps and g+ signin, than change compile ‘com.google.android.gms:play-services:8.1.0’ to compile ‘com.google.android.gms:play-services-maps:8.1.0’ compile ‘com.google.android.gms:play-services-plus:8.1.0’ From the doc : In versions of Google Play services prior to 6.5, you … Read more

Failed to resolve com.google.android.gms play-services-auth:11.4.0

Failed to resolve com.google.android.gms play-services-auth:11.4.0 . Add maven { url “https://maven.google.com” } to your root level build.gradle file allprojects { repositories { jcenter() maven { url “https://maven.google.com” } } } This maven repo is required starting from 11.2.0. You can also use the google() shortcut but check the requirements before using it. Also pay attention … Read more

using facebook sdk in Android studio

NOTE For Android Studio 0.5.5 and later, and with later versions of the Facebook SDK, this process is much simpler than what is documented below (which was written for earlier versions of both). If you’re running the latest, all you need to do is this: Download the Facebook SDK from https://developers.facebook.com/docs/android/ Unzip the archive In … Read more

HttpClient won’t import in Android Studio

HttpClient is not supported any more in sdk 23. You have to use URLConnection or downgrade to sdk 22 (compile ‘com.android.support:appcompat-v7:22.2.0’) If you need sdk 23, add this to your gradle: android { useLibrary ‘org.apache.http.legacy’ } You also may try to download and include HttpClient jar directly into your project or use OkHttp instead

Android Studio keeps refusing to resolve com.android.support:appcompat-v7:29.0.1

It happens because com.android.support:appcompat-v7:29.x.x doesn’t exist. You can check the revision history in the official doc. You can: Use the last 28.0.0 release of the support library migrate to androidx Also check this note: Note: With the release of Android 9.0 (API level 28) there is a new version of the support library called AndroidX … Read more

Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Update 2 (Follow this approach) You shouldn’t do this now. Instead fix all the errors. This is only a workaround until it’s removed. After that, you’ll need to fix errors manually anyways. Try to update your gradle plugin to 3.3.0-alpha06 to check if that fixes your issue. Update 1: Non-ascii characters issues have been fixed … Read more

Error:(1, 0) Plugin with id ‘com.android.application’ not found

Updated Answer (Dec. 2, 2020) Latest Gradle: 6.5 Version check: ./gradlew -v How to update: Set URL: ./gradlew wrapper –gradle-version=6.5 –distribution-type=all Update: ./gradlew wrapper Latest Android Gradle Plugin: 4.1.0 If you add the following code snippet to the top of your build.gradle file. Gradle will update the build tools. buildscript { repositories { google() // … Read more