google-developer-training / android-basics-kotlin-sql-basics-app

Fundamentals of relational databases and practice running SQL queries with Database Inspector in Android Studio.
Apache License 2.0
62 stars 130 forks source link

Use SQL to read and write to a database #70

Open VictorUzondu opened 2 weeks ago

VictorUzondu commented 2 weeks ago

Describe the problem bro its very difficult to get the starter code to run on this newer version of android studio and I can't go forward

Versions Android Studio version: Runtime version: 17.0.10+0--11572160 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

API version of the emulator: Don't know

alan614 commented 1 week ago

You can give the fork in this pull request a try: https://github.com/google-developer-training/android-basics-kotlin-sql-basics-app/pull/68

VictorUzondu commented 1 week ago

bro how do i get the code. i mean like download the new starter code you're referring to

daveTheOldCoder commented 1 week ago

bro how do i get the code. i mean like download the new starter code you're referring to

You can download the three changed files in the Pull Request and use them to replace the existing files in your project directory. On each of these pages, use the "Download raw file" icon in the upper right:

  1. gradle/wrapper/gradle-wrapper.properties:

https://github.com/google-developer-training/android-basics-kotlin-sql-basics-app/blob/62ddadeb1ac43a8d23d6d67366c2f488258a35c4/gradle/wrapper/gradle-wrapper.properties

  1. build.gradle:

https://github.com/google-developer-training/android-basics-kotlin-sql-basics-app/blob/62ddadeb1ac43a8d23d6d67366c2f488258a35c4/build.gradle

  1. app/build.gradle

https://github.com/google-developer-training/android-basics-kotlin-sql-basics-app/blob/62ddadeb1ac43a8d23d6d67366c2f488258a35c4/app/build.gradle

An alternative is to use git and checkout the PR's commit into a local repository.

However, I tried updating the files, and it didn't help. The project still has fatal build errors.

alan614 commented 1 week ago

@daveTheOldCoder what build errors are you getting? The other piece of the puzzle might be the device you're using for emulation. I think you need an image that has the play store. I was originally using the Pixel 8 API 34, I've changed to Pixel 9 API 34. You might want to give it a try

daveTheOldCoder commented 1 week ago

I'm using Linux (Ubuntu 24.04).

Build error:

Build file '/home/dave/Documents/AndroidStudio/Projects/AndroidBasicsWithCompose/SQLDemo/build.gradle' line: 39

A problem occurred evaluating root project 'SQLDemo'.
> Build was configured to prefer settings repositories over project repositories but repository 'Google' was added by build file 'build.gradle'

* 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.
> Get more help at https://help.gradle.org.
BUILD FAILED in 64ms

Is the emulator relevant at build-time?

daveTheOldCoder commented 1 week ago

This problem is not preventing my continuing with the course.

This Codelab's apparent purpose is only teaching the fundamentals of SQL, and I'm already very familiar with SQL.

VictorUzondu commented 1 week ago

You can give the fork in this pull request a try: #68

thanks bro

VictorUzondu commented 1 week ago

You can give the fork in this pull request a try: #68

thanks bro

VictorUzondu commented 1 week ago

bro how do i get the code. i mean like download the new starter code you're referring to

You can download the three changed files in the Pull Request and use them to replace the existing files in your project directory. On each of these pages, use the "Download raw file" icon in the upper right:

  1. gradle/wrapper/gradle-wrapper.properties:

https://github.com/google-developer-training/android-basics-kotlin-sql-basics-app/blob/62ddadeb1ac43a8d23d6d67366c2f488258a35c4/gradle/wrapper/gradle-wrapper.properties

  1. build.gradle:

https://github.com/google-developer-training/android-basics-kotlin-sql-basics-app/blob/62ddadeb1ac43a8d23d6d67366c2f488258a35c4/build.gradle

  1. app/build.gradle

https://github.com/google-developer-training/android-basics-kotlin-sql-basics-app/blob/62ddadeb1ac43a8d23d6d67366c2f488258a35c4/app/build.gradle

An alternative is to use git and checkout the PR's commit into a local repository.

However, I tried updating the files, and it didn't help. The project still has fatal build errors.

thanks bro