so I've created a new project in Android studio today "2021.1.1 Canary 3" version, but it won't build my project correctly.
> Build file 'C:\Users\Arash\Desktop\JPCompose\app\build.gradle' line: 2
>
> Plugin [id: 'com.android.application', version: '7.1.0-alpha03'] was
> not found in any of the following sources:
>
> * Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
>
> * Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '7.1.0-alpha03'] was not
> found in any of the following sources:
>
> - Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
> - Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.1.0-alpha03')
> Searched in the following repositories:
> Gradle Central Plugin Repository
> Google
> MavenRepo
Here is the App version of Gradle:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdk 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.arash.afsharpour.jpcompose"
minSdk 21
targetSdk 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.activity:activity-compose:1.3.0-alpha06'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
}
and this below is the Project version of my Gradle:
task clean(type: Delete) {
delete rootProject.buildDir
}
buildscript {
ext {
compose_version = '1.0.0-beta09'
}
}
this below is the settings.gradle:
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
plugins {
id 'com.android.application' version '7.1.0-alpha03'
id 'com.android.library' version '7.1.0-alpha03'
id 'org.jetbrains.kotlin.android' version '1.5.10'
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "JPCompose"
include ':app'
I've also tried lowering the version of Kotlin to 1.5.0 didn't work either, and as I've been searching for this quite a while now and didn't find anything remotely like what I'm having, hopefully, it can be report to google for this serious problem in this version.