AndroidUSBCamera icon indicating copy to clipboard operation
AndroidUSBCamera copied to clipboard

Could not find com.github.jiangdongguo.AndroidUSBCamera:libausbc:3.3.3

Open AuroraQuestDev opened this issue 6 months ago • 16 comments

Follow the official instruction, I added jcenter() to the build.gradle under the android folder of my expo project.

Image

Then, added implementation 'com.github.jiangdongguo.AndroidUSBCamera:libausbc:3.3.3' to the build.gradle under the android/app folder of the same project.

Image

Finally, npx expo run:android leads to an error says Could not find com.github.jiangdongguo.AndroidUSBCamera:libausbc:3.3.3.

AuroraQuestDev avatar Jun 18 '25 19:06 AuroraQuestDev

I got the same issue. Tried with 3.2.10 but the same issue

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform libausbc-3.3.3.aar (com.github.jiangdongguo.AndroidUSBCamera:libausbc:3.3.3) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find libausbc-3.3.3.aar (com.github.jiangdongguo.AndroidUSBCamera:libausbc:3.3.3).
        Searched in the following locations:
            https://www.jitpack.io/com/github/jiangdongguo/AndroidUSBCamera/libausbc/3.3.3/libausbc-3.3.3.aar
   > Failed to transform libnative-3.3.3.aar (com.github.jiangdongguo.AndroidUSBCamera:libnative:3.3.3) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find libnative-3.3.3.aar (com.github.jiangdongguo.AndroidUSBCamera:libnative:3.3.3).
        Searched in the following locations:
            https://www.jitpack.io/com/github/jiangdongguo/AndroidUSBCamera/libnative/3.3.3/libnative-3.3.3.aar
   > Failed to transform libuvc-3.3.3.aar (com.github.jiangdongguo.AndroidUSBCamera:libuvc:3.3.3) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find libuvc-3.3.3.aar (com.github.jiangdongguo.AndroidUSBCamera:libuvc:3.3.3).
        Searched in the following locations:
            https://www.jitpack.io/com/github/jiangdongguo/AndroidUSBCamera/libuvc/3.3.3/libuvc-3.3.3.aar
   > Failed to transform libuvccommon-3.3.3.aar (com.github.jiangdongguo.AndroidUSBCamera:libuvccommon:3.3.3) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find libuvccommon-3.3.3.aar (com.github.jiangdongguo.AndroidUSBCamera:libuvccommon:3.3.3).
        Searched in the following locations:
            https://www.jitpack.io/com/github/jiangdongguo/AndroidUSBCamera/libuvccommon/3.3.3/libuvccommon-3.3.3.aar

* 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.

devspace01 avatar Jun 20 '25 11:06 devspace01

+1

andersonhcc avatar Jun 20 '25 13:06 andersonhcc

Seems v3.2.10 is the latest available tag.

Image

AuroraQuestDev avatar Jun 20 '25 20:06 AuroraQuestDev

Experiencing the same issues trying to build Expo Android SDK 52

itsmnjn avatar Jun 21 '25 07:06 itsmnjn

貌似不维护了,用这个吧 https://github.com/shiyinghan/UVCAndroid

FaceAISDK avatar Jun 21 '25 08:06 FaceAISDK

Image

megahertzon avatar Jun 22 '25 01:06 megahertzon

you can donwload libausbc-3.3.3.aar on this link

Image

megahertzon avatar Jun 22 '25 01:06 megahertzon

From the link that @megahertzon posted you can download all the modules that you need. I needed some other modules too. https://repository.liferay.com/nexus/content/repositories/public/com/github/jiangdongguo/AndroidUSBCamera/

deniscoman avatar Jun 26 '25 12:06 deniscoman

I was able to bypass this recently by using the version at this maven url - https://mvnrepository.com/artifact/com.github.chenyeju295.AndroidUSBCamera/libausbc , with this line:

implementation("com.github.chenyeju295.AndroidUSBCamera:libausbc:3.3.6") in android/app/build.gradle and the corresponding repositories{maven{url maven { url 'https://jitpack.io' }}} in android/build.gradle.

FlinnBella avatar Jul 02 '25 08:07 FlinnBella

If the library is required by another dependency, adding this on top of what @FlinnBella suggested will fix the build process.

// Substitute the missing AndroidUSBCamera dependency
dependencySubstitution {
        substitute module('com.github.jiangdongguo.AndroidUSBCamera:libausbc') using module('com.github.chenyeju295.AndroidUSBCamera:libausbc:3.3.6')
}

geecko86 avatar Jul 06 '25 04:07 geecko86

it works! thanks

I was able to bypass this recently by using the version at this maven url - https://mvnrepository.com/artifact/com.github.chenyeju295.AndroidUSBCamera/libausbc , with this line:

implementation("com.github.chenyeju295.AndroidUSBCamera:libausbc:3.3.6") in android/app/build.gradle and the corresponding repositories{maven{url maven { url 'https://jitpack.io' }}} in android/build.gradle.

imwhyang avatar Jul 31 '25 01:07 imwhyang

it works! thanks

I was able to bypass this recently by using the version at this maven url - https://mvnrepository.com/artifact/com.github.chenyeju295.AndroidUSBCamera/libausbc , with this line:

implementation("com.github.chenyeju295.AndroidUSBCamera:libausbc:3.3.6") in android/app/build.gradle and the corresponding repositories{maven{url maven { url 'https://jitpack.io' }}} in android/build.gradle.

abeerbendary avatar Aug 03 '25 17:08 abeerbendary

this not work

you can donwload libausbc-3.3.3.aar on this link

Image `2025-08-03 19:15:46.555 4557-4557 AndroidRuntime com.example.myapplication E FATAL EXCEPTION: main Process: com.example.myapplication, PID: 4557 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/jiangdg/utils/XLogWrapper; at com.jiangdg.ausbc.utils.Logger.d(Logger.kt:38) at com.jiangdg.ausbc.utils.ActivityStackUtils.pushActivity(ActivityStackUtils.kt:31) at com.jiangdg.ausbc.base.BaseActivity.onCreate(BaseActivity.kt:36) at com.example.myapplication.MainActivity.onCreate(MainActivity.java:29) at android.app.Activity.performCreate(Activity.java:6734) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6121) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:795) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.jiangdg.utils.XLogWrapper" on path: DexPathList[[zip file "/data/app/com.example.myapplication-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.myapplication-1/lib/arm64, /system/lib64, /vendor/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:380) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.jiangdg.ausbc.utils.Logger.d(Logger.kt:38)  at com.jiangdg.ausbc.utils.ActivityStackUtils.pushActivity(ActivityStackUtils.kt:31)  at com.jiangdg.ausbc.base.BaseActivity.onCreate(BaseActivity.kt:36)  at com.example.myapplication.MainActivity.onCreate(MainActivity.java:29)  at android.app.Activity.performCreate(Activity.java:6734)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6121)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:795) 

`

abeerbendary avatar Aug 04 '25 11:08 abeerbendary

It seems the root cause is jar and aar files were not uploaded to the jitpack.io repository only pom file.

I found the way to bypass the issue without using the copy package com.github.chenyeju295.AndroidUSBCamera Define https://repository.liferay.com (this repo contains all files) repository before jitpack.io one in the base project gradle file:

buildscript {
   repositories {
        mavenCentral()
        mavenLocal()
        maven { url 'https://repository.liferay.com/nexus/content/repositories/public/'}         // <------
        maven { url 'https://www.jitpack.io' }
        google()
}

To resync the artifact optimally I removed the pom-file from cache gradle folder (.gradle\caches\modules-2\files-2.1\CLASS_PATH) and removed the descriptor file in (.gradle\caches\modules-2\metadata-2.XXX\descriptors\CLASS_PATH)

papandreus1 avatar Aug 20 '25 11:08 papandreus1

It seems the root cause is jar and aar files were not uploaded to the jitpack.io repository only pom file.

I found the way to bypass the issue without using the copy package com.github.chenyeju295.AndroidUSBCamera Define https://repository.liferay.com (this repo contains all files) repository before jitpack.io one in the base project gradle file:

buildscript {
   repositories {
        mavenCentral()
        mavenLocal()
        maven { url 'https://repository.liferay.com/nexus/content/repositories/public/'}         // <------
        maven { url 'https://www.jitpack.io' }
        google()
}

To resync the artifact optimally I removed the pom-file from cache gradle folder (.gradle\caches\modules-2\files-2.1\CLASS_PATH) and removed the descriptor file in (.gradle\caches\modules-2\metadata-2.XXX\descriptors\CLASS_PATH)

It works. Thanks a lot.

akshay2796 avatar Aug 27 '25 17:08 akshay2796