LeoColman / Petals

🌻 The Open Source app Petals aims to help its users to either quit weed, reduce usage or simply know how much they're using.
GNU Affero General Public License v3.0
85 stars 33 forks source link

Add information on how to build project #12

Closed LeoColman closed 2 years ago

pfieffer commented 9 months ago

Hi @LeoColman I came across the project and wanted to build it on my own. I am on Android Studio on Mac:

Android Studio Hedgehog | 2023.1.1 Patch 2
Build #AI-231.9392.1.2311.11330709, built on January 19, 2024
Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 11
Metal Rendering is ON
Registry:
    external.system.auto.import.disabled=true
    debugger.new.tool.window.layout=true
    ide.text.editor.with.preview.show.floating.toolbar=false
    ide.experimental.ui=true

Non-Bundled Plugins:
    com.jetbrains.kmm (0.8.2(231)-25)

I cloned the project and tried to build it but got the following errors:

Build Failure ``` FAILURE: Build completed with 13 failures. 1: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:checkFdroidDebugAarMetadata'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:mapFdroidDebugSourceSetPaths'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 3: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:mergeFdroidDebugResources'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 4: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:processFdroidDebugMainManifest'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 5: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:mergeFdroidDebugAssets'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 6: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:checkFdroidDebugDuplicateClasses'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 7: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:desugarFdroidDebugFileDependencies'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 8: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:mergeFdroidDebugNativeLibs'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 9: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:processFdroidDebugAndroidTestManifest'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 10: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:checkFdroidDebugAndroidTestAarMetadata'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 11: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:mergeFdroidDebugAndroidTestAssets'. > Could not resolve all artifacts for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 12: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:checkFdroidDebugAndroidTestDuplicateClasses'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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. ============================================================================== 13: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:desugarFdroidDebugAndroidTestFileDependencies'. > Could not resolve all files for configuration ':app:fdroidDebugRuntimeClasspath'. > Could not find com.github.AppDevNext:AndroidChart:3.1.0.18. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://dl.google.com/dl/android/maven2/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://jitpack.io/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom - https://s01.oss.sonatype.org/content/repositories/snapshots/com/github/AppDevNext/AndroidChart/3.1.0.18/AndroidChart-3.1.0.18.pom Required by: project :app * 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 9s ```

I suspect you are quite busy with other pressing concerns but thought I would report this anyway. Is there anything I can do / try to build successfully? Thanks. 😇

LeoColman commented 9 months ago

It seems like a dependency is not being found: AppDevNext:AndroidChart to v3.1.0.18

I think the quickest attempt to fix your build is to bump it to one of the later versions and see if your system finds it https://github.com/AppDevNext/AndroidChart/releases