google-gemini / generative-ai-android

The official Android library for the Google Gemini API
https://ai.google.dev/gemini-api/docs/get-started/tutorial?lang=android
Apache License 2.0
641 stars 141 forks source link

Trying to compile it on github... errors #168

Closed 0wwafa closed 3 weeks ago

0wwafa commented 1 month ago


JAVA_HOME=/usr/lib/jvm/temurin-17-jdk-amd64 gradle .

FAILURE: Build failed with an exception.

* What went wrong:
Task '.' not found in root project 'GenerativeAiSampleApp' and its subprojects.

* Try:
> Run gradle tasks to get a list of available tasks.
> For more on name expansion, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:name_abbreviation in the Gradle documentation.
> 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.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 1s

### Actual vs expected behavior:

compiling an APK.

### Any other information you'd like to share?

please add instructions on how to compile the android example using github...```
0wwafa commented 1 month ago

> Configure project :app
Declaring client module dependencies has been deprecated. This is scheduled to be removed in Gradle 9.0. Please use component metadata rules instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#declaring_client_module_dependencies
The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#deprecated_access_to_conventions
rlazo commented 1 month ago

HI @0wwafa not sure what you mean by compiling the example using github, could you provide some additional context?

For reference, to build the sample app we recommend you using the checked-in wrapper, and use the

./gradlew assemble

command from within the generativeai-android-sample folder.

0wwafa commented 3 weeks ago

HI @0wwafa not sure what you mean by compiling the example using github, could you provide some additional context?

I mean using GITHUB ACTIONS and a unix environment.

rlazo commented 3 weeks ago

https://github.com/google-gemini/generative-ai-android/blob/rl.sample.test.action/.github/workflows/sample.yml