Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SQL to read and write to a database - issue in making module #64

Open
LiadDavidson opened this issue Jul 15, 2024 · 0 comments
Open

Comments

@LiadDavidson
Copy link

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-sql?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-6-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-sql#2

In which task and step of the codelab can this issue be found?
3. Download the starter data set

Describe the problem
I downloaded the code as described the codelab from here: made sure it was the correct branch (compose)
Tried to run the app, but the "make" step fails.

Steps to reproduce?

  1. Download the code as described
  2. Android Studio notifies that AGP Upgrade is available:

Performed AGP upgrade "Android Gradle plugin version 7.3.1 has an upgrade available. Start the AGP Upgrade Assistant to update this project's AGP version."
Updates available
To take advantage of the latest features, improvements and fixes, we recommend that you upgrade this project's Android Gradle Plugin from 7.3.1 to 7.4.2.

  1. Perform the Upgrade successfully:

Sync succeeded
The upgraded project successfully synced with the IDE. You should test that the upgraded project builds and passes its tests successfully before making further changes.
The upgrade consisted of the following steps:
Upgrade AGP dependency from 7.3.1 to 7.4.2
Upgrade Gradle version to 7.5
Upgrade Gradle plugins

  1. Make module app
  2. See error in build output:

Task :app:kaptDebugKotlin
C:\Dev\Mobile\Android\SQL_Basics\app\build\tmp\kapt3\stubs\debug\com\example\sqldemo\AppDatabase.java:7: warning: Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide room.schemaLocation annotation processor argument OR set exportSchema to false.
public abstract class AppDatabase extends androidx.room.RoomDatabase {
^

Task :app:compileDebugKotlin FAILED
e: This version (1.1.1) of the Compose Compiler requires Kotlin version 1.6.10 but you appear to be using Kotlin version 1.6.21 which is not known to be compatible. Please fix your configuration (or suppressKotlinVersionCompatibilityCheck but don't say I didn't warn you!).

FAILURE: Build failed with an exception.

Versions
Android Studio version: Jellyfish 2023.1.1
API version of the emulator: 31 (never reached the part where the app is launched on the device)

Additional information
Full build output:

Executing tasks: [:app:assembleDebug, :app:assembleDebugUnitTest, :app:assembleDebugAndroidTest] in project C:\Dev\Mobile\Android\SQL_Basics

Task :app:createDebugVariantModel
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:generateDebugBuildConfig
Task :app:generateDebugResValues
Task :app:checkDebugAarMetadata
Task :app:mapDebugSourceSetPaths
Task :app:generateDebugResources
Task :app:packageDebugResources
Task :app:createDebugCompatibleScreenManifests
Task :app:extractDeepLinksDebug
Task :app:parseDebugLocalResources
Task :app:mergeDebugResources
Task :app:processDebugMainManifest
Task :app:processDebugManifest
Task :app:mergeDebugShaders
Task :app:compileDebugShaders NO-SOURCE
Task :app:generateDebugAssets UP-TO-DATE
Task :app:javaPreCompileDebug
Task :app:mergeDebugAssets
Task :app:processDebugJavaRes NO-SOURCE
Task :app:compressDebugAssets
Task :app:checkDebugDuplicateClasses
Task :app:desugarDebugFileDependencies
Task :app:mergeDebugJniLibFolders
Task :app:mergeLibDexDebug
Task :app:mergeDebugNativeLibs NO-SOURCE
Task :app:stripDebugDebugSymbols NO-SOURCE
Task :app:validateSigningDebug
Task :app:writeDebugAppMetadata
Task :app:writeDebugSigningConfigVersions
Task :app:assembleDebugUnitTest UP-TO-DATE
Task :app:preDebugAndroidTestBuild SKIPPED
Task :app:compileDebugAndroidTestAidl NO-SOURCE
Task :app:processDebugAndroidTestManifest
Task :app:compileDebugAndroidTestRenderscript NO-SOURCE
Task :app:generateDebugAndroidTestBuildConfig
Task :app:checkDebugAndroidTestAarMetadata
Task :app:generateDebugAndroidTestResValues
Task :app:mapDebugAndroidTestSourceSetPaths
Task :app:generateDebugAndroidTestResources
Task :app:mergeDebugAndroidTestShaders
Task :app:javaPreCompileDebugAndroidTest
Task :app:compileDebugAndroidTestShaders NO-SOURCE
Task :app:generateDebugAndroidTestAssets UP-TO-DATE
Task :app:mergeDebugAndroidTestAssets
Task :app:compressDebugAndroidTestAssets
Task :app:processDebugAndroidTestJavaRes NO-SOURCE
Task :app:mergeDebugAndroidTestJniLibFolders
Task :app:mergeDebugAndroidTestNativeLibs NO-SOURCE
Task :app:mergeDebugAndroidTestResources
Task :app:checkDebugAndroidTestDuplicateClasses
Task :app:desugarDebugAndroidTestFileDependencies
Task :app:validateSigningDebugAndroidTest
Task :app:writeDebugAndroidTestSigningConfigVersions
Task :app:mergeLibDexDebugAndroidTest
Task :app:processDebugManifestForPackage
Task :app:processDebugAndroidTestResources
Task :app:processDebugResources
Task :app:mergeExtDexDebugAndroidTest
Task :app:mergeExtDexDebug
Task :app:kaptGenerateStubsDebugKotlin

Task :app:kaptDebugKotlin
C:\Dev\Mobile\Android\SQL_Basics\app\build\tmp\kapt3\stubs\debug\com\example\sqldemo\AppDatabase.java:7: warning: Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide room.schemaLocation annotation processor argument OR set exportSchema to false.
public abstract class AppDatabase extends androidx.room.RoomDatabase {
^

Task :app:compileDebugKotlin FAILED
e: This version (1.1.1) of the Compose Compiler requires Kotlin version 1.6.10 but you appear to be using Kotlin version 1.6.21 which is not known to be compatible. Please fix your configuration (or suppressKotlinVersionCompatibilityCheck but don't say I didn't warn you!).

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 18s
47 actionable tasks: 47 executed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant