Hey guys how can I update to latest version because I cannot find the latest gradle-plugin. Can somone guide me on this?
build.gradle(:app)
plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
}
android {
namespace "com.abc.xyz"
compileSdk 34
defaultConfig {
applicationId "com.abc.xyz"
minSdk 24
targetSdk 34
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_compiler_version
}
packagingOptions {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
dependencies {
def composeBom = platform "androidx.compose:compose-bom:$compose_bom"
implementation composeBom
androidTestImplementation composeBom
implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.foundation:foundation")
implementation("androidx.compose.foundation:foundation-layout")
implementation("androidx.compose.material:material")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.runtime:runtime")
implementation("androidx.compose.runtime:runtime-livedata")
implementation("androidx.compose.ui:ui-tooling")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose")
implementation("androidx.activity:activity-compose:$compose_activity")
implementation("androidx.navigation:navigation-compose:$nav_version")
implementation("io.insert-koin:koin-android:$koin_android_version")
implementation ("io.insert-koin:koin-androidx-compose:$koin_android_compose_version")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
}
build.gradle(ExampleApp)
buildscript {
ext {
compose_compiler_version = "1.5.1"
compose_activity = "1.7.2"
compose_bom = "2023.06.01"
koin_android_version = "3.4.0"
koin_android_compose_version = "3.4.3"
nav_version = "2.6.0"
}
}
plugins {
id "com.android.application" version '8.1.0' apply false
id "com.android.library" version '8.1.0' apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
}
gradle-wrapper.properties
#Fri Mar 17 15:27:20 GMT 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Getting this warning message, I updated already everything what I am missing can somone tell me?
We recommend using a newer Android Gradle plugin to use compileSdk = 34
This Android Gradle plugin (8.1.0) was tested up to compileSdk = 33 (and compileSdkPreview = "UpsideDownCakePrivacySandbox").
You are strongly encouraged to update your project to use a newer
Android Gradle plugin that has been tested with compileSdk = 34.
If you are already using the latest version of the Android Gradle plugin,
you may need to wait until a newer version with support for compileSdk = 34 is available.
To suppress this warning, add/update
android.suppressUnsupportedCompileSdk=34
to this project's gradle.properties.
Just update Android Gradle plugin from 8.1.0 to 8.1.1
Sample:
Change
id "com.android.application" version '8.1.0' apply false
id "com.android.library" version '8.1.0' apply false
to
id "com.android.application" version '8.1.1' apply false
id "com.android.library" version '8.1.1' apply false
You just need to upgrade gradle to a version that is supported by sdk 34. To do that: File > Project Structure > Project > Gradle Version and select 8.1.1 or above. To also update the plugin version go to Tools -> AGP Upgrade Assistant and run the recommended settings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With