I'm facing multiple issues since a week. This is the current error: Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/4.0.2-6197926/aapt2-4.0.2-6197926-osx.jar'. Received status code 405 from server: Method Not Allowed Enable Gradle 'offline mode' and sync project
I'm using Android Studio version 4.0.2 and I did the enable/disable offline mode.
These are my grade files:
build.gradle(module: app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.fithubapptrialnew"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
}
build.gradle(project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I have tried invalidate cache/restart, Clean Project and Rebuild