gpt4 book ai didi

android - com.phonegap.plugins.facebookconnect 和 phonegap-plugin-push 不能一起工作

转载 作者:搜寻专家 更新时间:2023-11-01 07:52:55 25 4
gpt4 key购买 nike

我正在构建新的 Cordova 应用程序,无法使 com.phonegap.plugins.facebookconnectphonegap-plugin-push 插件一起工作。

这是 cordova run 输出:

:com.phonegap.plugins.facebookconnect:FacebookLib:compileLint
:com.phonegap.plugins.facebookconnect:FacebookLib:copyDebugLint UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:mergeDebugProguardFiles
:com.phonegap.plugins.facebookconnect:FacebookLib:preBuild
:com.phonegap.plugins.facebookconnect:FacebookLib:preDebugBuild
:com.phonegap.plugins.facebookconnect:FacebookLib:checkDebugManifest
:com.phonegap.plugins.facebookconnect:FacebookLib:preDebugTestBuild
:com.phonegap.plugins.facebookconnect:FacebookLib:prepareAndroidCordovaLibUnspecifiedDebugLibrary
:com.phonegap.plugins.facebookconnect:FacebookLib:prepareDebugDependencies
:com.phonegap.plugins.facebookconnect:FacebookLib:compileDebugAidl
:com.phonegap.plugins.facebookconnect:FacebookLib:compileDebugRenderscript
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugBuildConfig
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugAssets UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:mergeDebugAssets
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugResValues
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugResources
:com.phonegap.plugins.facebookconnect:FacebookLib:mergeDebugResources
:com.phonegap.plugins.facebookconnect:FacebookLib:processDebugManifest
:com.phonegap.plugins.facebookconnect:FacebookLib:processDebugResources
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugSources
:com.phonegap.plugins.facebookconnect:FacebookLib:compileDebugJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:com.phonegap.plugins.facebookconnect:FacebookLib:processDebugJavaRes UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugJar
:com.phonegap.plugins.facebookconnect:FacebookLib:compileDebugNdk
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugJniLibs UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugLocalJar
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugRenderscript UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugResources
:com.phonegap.plugins.facebookconnect:FacebookLib:bundleDebug
:prepareAndroidComPhonegapPluginsFacebookconnectFacebookLibUnspecifiedDebugLibrary
:prepareAndroidCordovaLibUnspecifiedDebugLibrary
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources
:generateDebugSources
:compileDebugJava
C:\workspace\myApp\platforms\android\src\com\adobe\phonegap\push\GCMIntentService.java:390: error: cannot find symbol
mBuilder.setColor(iconColor);
^
symbol: method setColor(int)
location: variable mBuilder of type Builder
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:compileDebugJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 27.011 secs

c:\workspace\myApp\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "c:\workspace\myApp\platforms\android\gradlew cdvBuildDebug -b c:\workspace\myApp\platforms\android\build.gradle -PcdvBuildArch=arm
-Dorg.gradle.daemon=true"
ERROR running one or more of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to run this project

来自 https://github.com/phonegap/phonegap-plugin-push/issues/51我明白 facebookconnect 使用 android-support-v4.jarphonegap-plugin 的 android-support-v13.jar 冲突-推。我已尝试按照建议删除/替换 android-support-v*.jar 但这没有帮助。

Cordova 版本:5.2.0

phonegap-plugin-push 版本:1.2.0

com.phonegap.plugins.facebookconnect 版本:0.11.0

最佳答案

更新

此解决方案不适用于最新的 com.phonegap.plugins.facebookconnect 插件。我用 cordova-plugin-facebook4 替换了 Facebook 插件叉。它使用 v4 Android 库并且不与 phonegap-plugin-push 插件冲突。


在其他论坛的一些帮助下,我终于能够让它工作了!

这是我做的:

  1. 移除\plugins\com.phonegap.plugins.facebookconnect\platforms\android\FacebookLib\libs\android-support-v4.jar文件
  2. 复制 \plugins\phonegap-plugin-push\src\android\libs\android-support-v13.jar 文件到 \plugins\com.phonegap.plugins.facebookconnect\platforms\android\FacebookLib\libs\
  3. 在文本编辑器(使用 Notepad++ 或任何其他新行友好的编辑器)中打开 \plugins\com.phonegap.plugins.facebookconnect\platforms\android\FacebookLib\build.gradle 文件
  4. 在 dependencies block 下,将 support-v4 替换为 support-v13。它应该看起来像这样:

    依赖关系{
    编译 'com.android.support:support-v13:[20,21)'
    编译 'com.parse.bolts:bolts-android:1.1.2'
    }

  5. 删除\platforms\android\build\文件夹并使用cordova build

    编译项目

所有路径都与 Cordova 项目的根相关。

关于android - com.phonegap.plugins.facebookconnect 和 phonegap-plugin-push 不能一起工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32280539/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com