chenyeju295 / flutter_uvc_camera

Flutter package
https://pub.dev/packages/flutter_uvc_camera
MIT License
11 stars 11 forks source link

Could not resolve all files for configuration ':app:debugRuntimeClasspath' #2

Closed Joao-Peterson closed 7 months ago

Joao-Peterson commented 7 months ago

Got a gradle error when executing the example:

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.chenyeju295.AndroidUSBCamera:libausbc:3.3.6.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/chenyeju295/AndroidUSBCamera/libausbc/3.3.6/libausbc-3.3.6.pom
       - https://repo.maven.apache.org/maven2/com/github/chenyeju295/AndroidUSBCamera/libausbc/3.3.6/libausbc-3.3.6.pom
       - https://storage.googleapis.com/download.flutter.io/com/github/chenyeju295/AndroidUSBCamera/libausbc/3.3.6/libausbc-3.3.6.pom
     Required by:
         project :app > project :flutter_uvc_camera
   > Could not find com.github.chenyeju295.AndroidUSBCamera:libuvc:3.3.6.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/chenyeju295/AndroidUSBCamera/libuvc/3.3.6/libuvc-3.3.6.pom
       - https://repo.maven.apache.org/maven2/com/github/chenyeju295/AndroidUSBCamera/libuvc/3.3.6/libuvc-3.3.6.pom
       - https://storage.googleapis.com/download.flutter.io/com/github/chenyeju295/AndroidUSBCamera/libuvc/3.3.6/libuvc-3.3.6.pom
     Required by:
         project :app > project :flutter_uvc_camera

I suspect it might a problem in my system gradle and jdk version.

flutter doctor -v:

[✓] Flutter (Channel , 3.19.5, on Linux 6.8.1-arch1-1, locale en_US.UTF-8)
    • Flutter version 3.19.5 on channel  at /usr/lib/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision archlinuxaur (unknown (arch linux aur package)), 2038-01-19 03:14:08
    • Engine revision e76c95649884
    • Dart version 3.3.2
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /opt/android-sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /opt/android-sdk
    • ANDROID_SDK_ROOT = /opt/android-sdk
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.2+13)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 17.0.6
    • cmake version 3.28.3
    • ninja version 1.11.1
    • pkg-config version 2.1.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (2 available)
    • ASUS X01AD (mobile) • 192.168.0.101:5555 • android-arm64 • Android 9 (API 28)
    • Linux (desktop)     • linux              • linux-x64     • Linux 6.8.1-arch1-1

[✓] Network resources
    • All expected network resources are available.
Joao-Peterson commented 7 months ago

Nevermind, added maven { url "https://jitpack.io" } to my android/build.gradle file:

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

...