Android 爱奥尼亚facebook和条形码扫描仪问题
我对facebook插件和条形码扫描器有一个问题,首先我创建了一个单独的项目来检查facebook插件的工作方式和工作是否完美,但是当我将facebook插件添加到我的项目中,我使用的是barcodescanner插件,我无法在android中运行该项目时,我得到了以下例外:Android 爱奥尼亚facebook和条形码扫描仪问题,android,facebook,ionic-framework,barcode-scanner,Android,Facebook,Ionic Framework,Barcode Scanner,我对facebook插件和条形码扫描器有一个问题,首先我创建了一个单独的项目来检查facebook插件的工作方式和工作是否完美,但是当我将facebook插件添加到我的项目中,我使用的是barcodescanner插件,我无法在android中运行该项目时,我得到了以下例外: BUILD FAILED Total time: 10.111 secs FAILURE: Build failed with an exception. * What went wrong: Execution f
BUILD FAILED
Total time: 10.111 secs
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/zxing/BarcodeFormat.class
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/zxing/BarcodeFormat.class
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ERROR] An error occurred while running cordova run android (exit code 1).
更改Facebook插件的所需版本为我解决了这个问题
ionic cordova plugin add cordova-plugin-facebook4@1.7.4 --variable APP_ID="" --variable APP_NAME=""
更改Facebook插件的所需版本为我解决了这个问题
ionic cordova plugin add cordova-plugin-facebook4@1.7.4 --variable APP_ID="" --variable APP_NAME=""
步骤1:安装条形码扫描仪插件:
$ ionic cordova plugin add phonegap-plugin-barcodescanner
$ npm install --save @ionic-native/barcode-scanner
步骤2:安装Facebook插件:(使用以下Facebook插件版本)
步骤3:从以下路径打开文件facebookconnect.xml
:yourapp\platforms\android\app\src\main\res\values
并在
***您的应用程序id***
***您的应用程序名称***
步骤4:命令:cordova clean
-允许cordova清理您的应用程序
步骤5:命令:cordova build
-检查cordova build您的应用程序
步骤6:命令:
ionic cordova build android
-构建你的应用程序步骤1:安装条形码扫描仪插件:
$ ionic cordova plugin add phonegap-plugin-barcodescanner
$ npm install --save @ionic-native/barcode-scanner
步骤2:安装Facebook插件:(使用以下Facebook插件版本)
步骤3:从以下路径打开文件facebookconnect.xml
:yourapp\platforms\android\app\src\main\res\values
并在
***您的应用程序id***
***您的应用程序名称***
步骤4:命令:cordova clean
-允许cordova清理您的应用程序
步骤5:命令:cordova build
-检查cordova build您的应用程序
第6步:命令:ionic cordova build android
-构建你的应用程序