Closed pitampoudel closed 3 years ago
Use 3.4.0
, not 3.4.0-agp7.0
.
While using 3.4.0 I, am getting different error.
Unable to find method ''void com.android.build.gradle.internal.dsl.BaseAppModuleExtension.onVariants(kotlin.jvm.functions.Function1)''
'void com.android.build.gradle.internal.dsl.BaseAppModuleExtension.onVariants(kotlin.jvm.functions.Function1)'
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
My Files are build.gradle (project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = "1.5.10"
hilt_version = "2.36"
room_version = "2.3.0"
compose_version = "1.0.0-beta08"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath("com.google.dagger:hilt-android-gradle-plugin:$hilt_version")
classpath("com.google.gms:google-services:4.3.8")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.7.0")
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and build.gradle(app)
plugins {
id 'com.android.application'
id 'kotlin-android'
id("kotlin-kapt")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("dagger.hilt.android.plugin")
id "com.onesignal.androidsdk.onesignal-gradle-plugin" version "0.12.10"
id 'com.github.triplet.play' version '3.4.0'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
play {
serviceAccountCredentials.set(file("IMP/pc-api-xxxxxxxxx.json"))
}
defaultConfig {
applicationId "com.pitam.myapplication"
minSdkVersion 21
targetSdkVersion 30
versionCode = 18
versionName = "V.0.$versionCode"
multiDexEnabled = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}
signingConfigs {
def password = System.getenv("PASSWORD") as String
release {
storeFile file("IMP/myapplication.jks")
keyAlias "key0"
enableV3Signing = true
enableV4Signing = true
storePassword password
keyPassword password
}
}
buildTypes {
release {
signingConfig signingConfigs.release
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
useIR = true
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerVersion = kotlin_version
kotlinCompilerExtensionVersion = compose_version
}
}
dependencies {
implementation(project(':uis'))
//Onesignal
api 'com.onesignal:OneSignal:4.4.0'
//Work
api("androidx.work:work-runtime-ktx:2.5.0")
//Room Compiler
kapt("androidx.room:room-compiler:$room_version")
//HILT
implementation("com.google.dagger:hilt-android:$hilt_version")
kapt("com.google.dagger:hilt-android-compiler:$hilt_version")
// Hilt for Worker
def androidx_hilt = "1.0.0"
implementation("androidx.hilt:hilt-work:$androidx_hilt")
kapt("androidx.hilt:hilt-compiler:$androidx_hilt")
//Other
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.3.1")
implementation("androidx.browser:browser:1.3.0")
//Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'
//chucker
debugImplementation "com.github.chuckerteam.chucker:library:3.4.0"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.4.0"
}
Oh wait, you need 3.4.0-agp4.2. Sorry. :)
Describe the bug
I can do
I can not do
Error message
Versions