- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
同时使用 cordova-plugin-facebook@2.4.0 和 phonegap-plugin-barcodescanner@8.0.0 时,我在构建我的 cordova 应用程序时遇到了问题。
config.xml
<platform name="android">
<hook src="hooks/__myapp/android_plugins_plugman.js" type="after_platform_add" />
<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="26" />
<preference name="AndroidPersistentFileLocation" value="Internal" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
...
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
...
<config-file parent="/resources" target="./res/values/strings.xml">
<string name="fb_app_id">some app id</string>
<string name="fb_app_name">app name</string>
</config-file>
</platform>
...
<plugin name="cordova-plugin-facebook4" spec="file:cordova_plugins/cordova-plugin-facebook4-2.4.0">
<variable name="APP_ID" value="some app id" />
<variable name="APP_NAME" value="app name" />
<variable name="ANDROID_SDK_VERSION" value="4.+" />
</plugin>
<plugin name="phonegap-plugin-barcodescanner" spec="file:cordova_plugins/phonegap-plugin-barcodescanner-8.0.0">
<variable name="CAMERA_USAGE_DESCRIPTION" value="some description" />
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.1.1" />
</plugin>
...
<engine name="ios" spec="^4.5.5" />
<engine name="android" spec="^7.0.2" />
错误日志
Android Studio project detected
config file res/values/facebookconnect.xml requested for changes not found at /Users/SOME_USER_NAME/projects/SOME_PROJECT/platforms/android/res/values/facebookconnect.xml, ignoring
config file res/values/facebookconnect.xml requested for changes not found at /Users/SOME_USER_NAME/projects/SOME_PROJECT/platforms/android/res/values/facebookconnect.xml, ignoring
Running command: /Users/SOME_USER_NAME/projects/SOME_PROJECT/hooks/after_prepare/010_add_platform_class.js /Users/SOME_USER_NAME/projects/SOME_PROJECT
Running command: /Users/SOME_USER_NAME/projects/SOME_PROJECT/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/SOME_USER_NAME/projects/SOME_PROJECT
ANDROID_HOME=/Users/SOME_USER_NAME/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
studio
:wrapper
BUILD SUCCESSFUL
Total time: 2.882 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_3woh5i5cs7vu80u1tavsoqgsd.run(/Users/SOME_USER_NAME/projects/SOME_PROJECT/platforms/android/app/build.gradle:144)
:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild
UP-TO-DATE
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugRenderscript
:CordovaLib:checkDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:prepareLintJar
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:platformAttrExtractor
:CordovaLib:processDebugManifest
:CordovaLib:javaPreCompileDebug
:CordovaLib:processDebugJavaRes
NO-SOURCE
:app:preBuild
UP-TO-DATE
:app:preDebugBuild
Download https://maven.google.com/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.pom
Download https://maven.google.com/com/android/support/customtabs/27.0.2/customtabs-27.0.2.pom
Download https://maven.google.com/com/android/support/cardview-v7/27.0.2/cardview-v7-27.0.2.pom
Download https://maven.google.com/com/android/support/animated-vector-drawable/27.0.2/animated-vector-drawable-27.0.2.pom
Download https://maven.google.com/com/android/support/support-vector-drawable/27.0.2/support-vector-drawable-27.0.2.pom
Download https://maven.google.com/com/android/support/customtabs/27.0.2/customtabs-27.0.2.aar
Download https://maven.google.com/com/android/support/animated-vector-drawable/27.0.2/animated-vector-drawable-27.0.2.aar
Download https://maven.google.com/com/android/support/support-vector-drawable/27.0.2/support-vector-drawable-27.0.2.aar
Download https://maven.google.com/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.aar
Download https://maven.google.com/com/android/support/cardview-v7/27.0.2/cardview-v7-27.0.2.aar
:app:compileDebugAidl
:CordovaLib:packageDebugRenderscript
NO-SOURCE
:app:compileDebugRenderscript
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
Note: /Users/SOME_USER_NAME/projects/SOME_PROJECT/platforms/android/app/src/main/java/org/apache/cordova/facebook/ConnectPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugNdk
NO-SOURCE
:app:compileDebugSources
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformDexArchiveWithExternalLibsDexMergerForDebug
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
>
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
* Try:
Run with
--stacktrace option to get the stack trace. Run with --info
or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED
in 25s
37 actionable tasks: 37 executed
(node:16024) UnhandledPromiseRejectionWarning: Error: /Users/SOME_USER_NAME/projects/SOME_PROJECT/platforms/android/gradlew: 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.
Note: /Users/SOME_USER_NAME/projects/SOME_PROJECT/platforms/android/app/src/main/java/org/apache/cordova/facebook/ConnectPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 25s
at ChildProcess.whenDone (/Users/SOME_USER_NAME/projects/SOME_PROJECT/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Socket.stream.socket.on (internal/child_process.js:381:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close (net.js:606:12)
(node:16024) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16024) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
讨论开始于 https://github.com/jeduan/cordova-plugin-facebook4/issues/705 .也许这里有人有更多想法。谢谢!
最佳答案
尝试使用这个插件
<plugin spec="https://github.com/Telerik-Verified-Plugins/BarcodeScanner.git" source="git" > </plugin>
关于android - 无法使用 cordova-plugin-facebook4 和 phonegap-plugin-barcodescanner 构建 cordova 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52270613/
Example image 如何在 Phonegap 中添加像这张图片这样的 float 气泡通知。 最佳答案 没有您正在寻找的“开箱即用”插件。但是,您可以创建自己的插件或简单地使用 phonega
我正在使用 HTML 和 JS、JQuery Mobile 构建一个应用程序,并使用 PhoneGap Build 进行打包。客户想知道是否可以添加打印功能...有人知道吗?没有 PG Build 打
我已经安装了 Phonegap 使用 $ npm install -g PhoneGap 我也创建了项目。之后我做了 $ PhoneGap build android 它给出了 [phonegap]
我尝试创建 Phonegap 项目,其中需要集成 ASIHTTPRequest 和 JASON 引用, 并出现以下错误 ld: duplicate symbol _SBJSONErrorDomain
我有一个 Phonegap 应用程序,我从早期版本的 Phonegap 开始,我想升级到最新版本。我需要采取哪些步骤来升级它? 我正在寻求一般性答案,但我的具体情况是 Phonegap 1.1.0 -
我已在我的 MAC 电脑(IOS 10.5.8,SDK 3.1.2)上成功安装 PhoneGap。尝试创建一个新的基于 PhoneGap 的应用程序,包含 PhoneGap 框架并将所需的文件复制到
我正在 phonegap 中为三个不同的平台构建一个应用程序:Android、iOS 和 Blackberry。这样做时,我必须检测设备类型,以便我可以在不同平台和不同设备(如 Android Pho
开始在Mac上使用phonegap(Xcode 4,构建iPhone应用程序)我已经阅读了很多有关名为phonegap.plist的文件的内容,包括外部URL的白名单和其他内容。 这是我的问题,我在
所以我有一个运行 Phonegap 1.4.0 的应用程序(不要问),我决定升级到 1.8.1,这样做时 Phonegap 全局变量不再存在,将被替换为实用程序。 所以我转换了每一次出现: var t
我尝试了什么: 我正在开发一个安卓应用程序。在我的应用程序中,我必须打开 -> 向用户显示 Microsoft Office 文档(doc、docx、xls、xlsx、ppt、pptx)内容。为此,我
使用phonegap制作iOS应用时,ChildBrowser插件可以打开一个可以使用phonegap功能的远程页面吗? 例如:在phonegap应用程序中的index.html,调用childbro
我有一个带有 angularjs 的网络应用程序。我想使用 phonegap 将它变成一个移动应用程序 (android)。 我使用了 phonegap 构建:https://build.phoneg
我正在使用 Phonegap build 为每个平台生成可执行文件。每次更改代码时,我都必须在 phonegap build 上上传代码并生成新的 Apk 文件(适用于 android)。我不想在真实
我很生气,这是毫无疑问的,除了明显的可见差异之外,有人报告高度为: $('body').outerHeight(); //1780 与在我的本地 Windows 8 机器上使用 phonegap
我最近使用 phonegap 完成了我的第一个混合应用程序项目。当谈到公开测试时,我有点害怕签名过程。我从这里以及网上的其他地方阅读了许多不同的建议 fragment 来完成这项工作。 以下是如何为
我是 phonegap 的新手,我尝试创建一个简单的 phonegap 应用程序。 使用命令行安装phonegap后:--- 我已经成功创建了项目,但是当我尝试运行 phonegap build io
我正在为 Android 平台制作一个 phonegap 应用程序。在这个应用程序中,我想在多个 html 页面中滑动导航。请告诉我该怎么做。要么在单个 html 页面中完成,要么我必须为此滑动导航创
是否有任何插件可用于 Juce我可以添加哪些库可以同时适用于 IOS 和 android?如果没有,我如何集成 Juce我的电话间隙应用程序中的库? 最佳答案 没有插件。但您可以使用介绍榨汁机来创建不
Phonegap 刚刚推出了一种方法,可以使用以下命令使用本地服务器立即查看您对 phonegap 应用程序的更改: phonegap serve 然后通过下载 PhoneGap Developer
我们对如何集成phonegap插件,然后使用phonegap build构建我们的移动应用程序有一些疑问,这可能吗? 当您使用 Phonegapbuild 构建您的应用程序时,它会为所有受支持的设备构
我是一名优秀的程序员,十分优秀!