Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Change the .aar from resource-file to lib-file #592

Merged
merged 1 commit into from
Jan 8, 2018

Conversation

jcesarmobile
Copy link
Collaborator

@jcesarmobile jcesarmobile commented Jan 8, 2018

I saw a comment that said that using lib-file might fix the cordova-android 7/Cordova 8 issue.
Not sure why we have been using resource-file if the .aar is really a lib-file, maybe because resource-file allows to rename the file?

With lib-file it works, but had to also change the compile name on src/android/barcodescanner.gradle.
Other alternative is to rename the .aar, but I think it's better to keep the name so we can easily know the version we are using.

Fixes #589

Copy link
Collaborator

@EddyVerbruggen EddyVerbruggen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@macdonst macdonst merged commit 4dcf4ea into phonegap:master Jan 8, 2018
@macdonst
Copy link
Member

macdonst commented Jan 8, 2018

Thanks @jcesarmobile

@jcesarmobile jcesarmobile deleted the cordova-8-fix branch January 9, 2018 14:07
@salazarr-js
Copy link

when will be this fix in the package.json version?, I installed the plugin and still have the build issue with cordova 8 and android 7, I had to do this fix manually then ionic cordova platform add android ionic cordova build android and works

@emmgali
Copy link

emmgali commented Jan 12, 2018

@Slzr how did you fixed it manually?

@jcesarmobile
Copy link
Collaborator Author

You can install from github url for now
cordova plugin add https://github.com/phonegap/phonegap-plugin-barcodescanner

@macdonst can you do a 7.0.2 release if you have time?

@salazarr-js
Copy link

@Trekkar I'm using ionic but I think is the same thing, just use the corresponding cordova cli commands

 # Remove the android build (if you have it)
> ionic cordova platform rm android
# Install the plugin (if you dont have it)
> ionic cordova plugin add phonegap-plugin-barcodescanner

In the plugins folder, go to cordova-plugin-barcodescanner folder and make the same changes as in the #592 commit

 # Add your platform again
> ionic cordova platform add android
# And build
> ionic cordova build android

that is all I did and works for me, hope was helpful 🍻
@jcesarmobile I tryed installing it from github like you say in the stackoverflow question but get Failed to fetch plugin https://github.com/phonegap/phonegap-plugin-barcodescanner via registry. error.
thanks for the fix 👍 ❤️

@macdonst
Copy link
Member

I published a version 7.0.2 version to NPM.

cc: @Slzr @Trekkar

@caroguerrero
Copy link

Thks, works!!

@lock
Copy link

lock bot commented Jun 7, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Gradle Error:Failed to resolve: :barcodescanner:
6 participants