Please help!
defaultConfig, buildTypes, and composeOptions are throwing these errors:
- public open val defaultConfig: [Error type: Unresolved type for DefaultConfig]
- public open val buildTypes: [Error type: Unresolved type for NamedDomainObjectContainer ]<[Error type: Unresolved type for BuildType]>
- public open val composeOptions: [Error type: Unresolved type for ComposeOptions]
I upgraded from android chipmunk to dolphin and I noticed this. I am not getting any errors in my application but it takes forever for the api data to load. It wasn't doing this before.
Also, in the Logcat this warning is thrown repeatedly until the api data is loaded. -> presentDisplay display has no layers to compose, flushing client target buffer.
I have tried to find info on this, but nothing I have found has helped my situation. Any help or advice you may have is welcomed and appreciated.
Module build.gradle:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
}
android {
compileSdk 33
defaultConfig {
applicationId "com.samm.brewerysearch"
minSdk 21
targetSdk 33
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
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
namespace 'com.samm.brewerysearch'
}
dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.activity:activity-compose:1.5.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
implementation 'com.google.android.material:material:1.6.1'
//Navigation
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
// retrofit
implementation "com.squareup.retrofit2:retrofit:2.9.0"
// GSON
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
// coroutine
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
// hilt
implementation "com.google.dagger:hilt-android:2.42"
kapt "com.google.dagger:hilt-compiler:2.42"
}
Project build.gradle:
buildscript {
ext {
compose_version = '1.2.0-beta01'
}
dependencies {
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.42'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}
plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
id 'com.google.dagger.hilt.android' version '2.41' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}