Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: How to install barcode-scanner for android #7761

Closed
1 of 3 tasks
tungtouch opened this issue Nov 15, 2024 · 5 comments
Closed
1 of 3 tasks

[Bug]: How to install barcode-scanner for android #7761

tungtouch opened this issue Nov 15, 2024 · 5 comments
Labels

Comments

@tungtouch
Copy link

tungtouch commented Nov 15, 2024

Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.1.2
@capacitor/core: 6.1.2
@capacitor/android: 6.1.2
@capacitor/ios: 6.1.2

Installed Dependencies:

@capacitor/cli: 6.0.0
@capacitor/ios: 6.0.0
@capacitor/android: 6.0.0
@capacitor/core: 6.0.0

[success] iOS looking great! 👌
[success] Android looking great! 👌

Other API Details

npm --version output: 9.8.1
node --version output: v18.18.0
pod --version output: 1.14.3

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

I install barcode-scanner for android from url https://capacitorjs.com/docs/apis/barcode-scanner#android
Plugin for ios work well.
But for android cant working. When i run command "npx cap run android"
image

Result bug:

✔ Please choose a target device: › OPPO CPH2113 (5d70fb21)
✖ Running Gradle build - failed!
[error] 
        Welcome to Gradle 8.9!
        
        Here are the highlights of this release:
        - Enhanced Error and Warning Messages
        - IDE Integration Improvements
        - Daemon JVM Information
        
        For more details see https://docs.gradle.org/8.9/release-notes.html
        
        Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status
        for details
        
        > Configure project :app
        WARNING: Using flatDir should be avoided because it doesn't support any
        meta-data formats.
        
        > Configure project :capacitor-cordova-android-plugins
        WARNING: Using flatDir should be avoided because it doesn't support any
        meta-data formats.
        
        > Task :app:preBuild UP-TO-DATE
        > Task :app:preDebugBuild UP-TO-DATE
        > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
        > Task :app:javaPreCompileDebug UP-TO-DATE
        > Task :capacitor-android:preBuild UP-TO-DATE
        > Task :capacitor-android:preDebugBuild UP-TO-DATE
        > Task :capacitor-android:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-app:preBuild UP-TO-DATE
        > Task :capacitor-app:preDebugBuild UP-TO-DATE
        > Task :capacitor-app:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-barcode-scanner:preBuild UP-TO-DATE
        > Task :capacitor-barcode-scanner:preDebugBuild UP-TO-DATE
        > Task :capacitor-barcode-scanner:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-browser:preBuild UP-TO-DATE
        > Task :capacitor-browser:preDebugBuild UP-TO-DATE
        > Task :capacitor-browser:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-community-keep-awake:preBuild UP-TO-DATE
        > Task :capacitor-community-keep-awake:preDebugBuild UP-TO-DATE
        > Task :capacitor-community-keep-awake:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:preBuild UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:preDebugBuild UP-TO-DATE
        > Task :capacitor-device:preBuild UP-TO-DATE
        > Task :capacitor-device:preDebugBuild UP-TO-DATE
        > Task :capacitor-device:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-filesystem:preBuild UP-TO-DATE
        > Task :capacitor-filesystem:preDebugBuild UP-TO-DATE
        > Task :capacitor-filesystem:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-geolocation:preBuild UP-TO-DATE
        > Task :capacitor-geolocation:preDebugBuild UP-TO-DATE
        > Task :capacitor-geolocation:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-haptics:preBuild UP-TO-DATE
        > Task :capacitor-haptics:preDebugBuild UP-TO-DATE
        > Task :capacitor-haptics:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-network:preBuild UP-TO-DATE
        > Task :capacitor-network:preDebugBuild UP-TO-DATE
        > Task :capacitor-network:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-share:preBuild UP-TO-DATE
        > Task :capacitor-share:preDebugBuild UP-TO-DATE
        > Task :capacitor-share:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-splash-screen:preBuild UP-TO-DATE
        > Task :capacitor-splash-screen:preDebugBuild UP-TO-DATE
        > Task :capacitor-splash-screen:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-status-bar:preBuild UP-TO-DATE
        > Task :capacitor-status-bar:preDebugBuild UP-TO-DATE
        > Task :capacitor-status-bar:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:writeDebugAarMetadata
        > Task :capacitorvolume:preBuild UP-TO-DATE
        > Task :capacitorvolume:preDebugBuild UP-TO-DATE
        > Task :capacitorvolume:writeDebugAarMetadata UP-TO-DATE
        > Task :capawesome-capacitor-badge:preBuild UP-TO-DATE
        > Task :capawesome-capacitor-badge:preDebugBuild UP-TO-DATE
        > Task :capawesome-capacitor-badge:writeDebugAarMetadata UP-TO-DATE
        > Task :capgo-capacitor-updater:preBuild UP-TO-DATE
        > Task :capgo-capacitor-updater:preDebugBuild UP-TO-DATE
        > Task :capgo-capacitor-updater:writeDebugAarMetadata UP-TO-DATE
        > Task :app:checkDebugAarMetadata FAILED
        
        FAILURE: Build failed with an exception.
        
        * What went wrong:
        Execution failed for task ':app:checkDebugAarMetadata'.
        > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
        > Could not find any matches for
        com.github.outsystems:osbarcode-android:[1.0.1, 2.0.0[ as no versions of
        com.github.outsystems:osbarcode-android are available.
        Searched in the following locations:
        -
        https://dl.google.com/dl/android/maven2/com/github/outsystems/osbarcode-android/maven-metadata.xml
        -
        https://repo.maven.apache.org/maven2/com/github/outsystems/osbarcode-android/maven-metadata.xml
        -
        file:/Users/mike/Development/core/app/android/capacitor-cordova-android-plugins/src/main/libs/
        - file:/Users/mike/Development/core/app/android/app/libs/
        Required by:
        project :app > project :capacitor-barcode-scanner
        
        * 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 1m 10s
        19 actionable tasks: 2 executed, 17 up-to-date

I think problem at there:
maven {
url 'https://pkgs.dev.azure.com/OutSystemsRD/9e79bc5b-69b2-4476-9ca5-d67594972a52/_packaging/PublicArtifactRepository/maven/v1'
name 'Azure'
credentials {
username = "optional"
password = ""
}
content {
includeGroup "com.github.outsystems"
}
}

Expected Behavior

How to fix it? Thanks

Project Reproduction

https://capacitorjs.com/docs/apis/barcode-scanner#android

Additional Information

No response

@tungtouch tungtouch changed the title [Bug]: How to barcode-scanner for android [Bug]: How to install barcode-scanner for android Nov 15, 2024
@tungtouch
Copy link
Author

.

@sakonn
Copy link

sakonn commented Nov 18, 2024

I am experiencing the same problem but think opening the issue in the barcode scanner repository would be more relevant: https://github.com/ionic-team/capacitor-barcode-scanner/issues.

@tungtouch
Copy link
Author

Thanks

I am experiencing the same problem but think opening the issue in the barcode scanner repository would be more relevant: https://github.com/ionic-team/capacitor-barcode-scanner/issues.

Got it! thanks

@jcesarmobile
Copy link
Member

closing in favor of ionic-team/capacitor-barcode-scanner#42

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
Copy link

ionitron-bot bot commented Dec 18, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants