简体   繁体   English

libgdx firebase robovm绑定

[英]Libgdx firebase robovm binding

I am trying to import Firebase Messaging and Google Mobile Ads frameworks into my game which is developed in LibGDX and bridged to iOS with RoboVM. 我正在尝试将Firebase Messaging和Google Mobile Ads框架导入到我的游戏中,该框架是用LibGDX开发的,并通过RoboVM桥接到iOS。



When i only try to import Firebase Messaging, it requires FirebaseCore then it requires another frameworks until the FirebaseNanoPB which is not exist in the latest SDK(5.20.2). 当我仅尝试导入Firebase Messaging时,它需要FirebaseCore,然后需要另一个框架,直到最新的SDK(5.20.2)中不存在FirebaseNanoPB。

  //robovm.xml
  <frameworkPaths>
        <path>libs</path>
    </frameworkPaths>
  <libs>
      <lib>z</lib>   
  </libs>
  <frameworks>
    <framework>UIKit</framework>
    <framework>OpenGLES</framework>
    <framework>QuartzCore</framework>
    <framework>CoreGraphics</framework>
    <framework>OpenAL</framework>
    <framework>AudioToolbox</framework>
    <framework>AVFoundation</framework>
    <framework>CoreMotion</framework>
    <framework>SafariServices</framework>

    <framework>FirebaseMessaging</framework>
    <framework>Protobuf</framework>


    <framework>GoogleToolboxForMac</framework>
    <framework>FirebaseCore</framework>
    <framework>FirebaseCoreDiagnostics</framework>
    <framework>FirebaseInstanceID</framework>
    <framework>FirebaseAnalytics</framework>
    <framework>GoogleMobileAds</framework>
    <framework>nanopb</framework>


  </frameworks>

这是我在ios包中的项目文件夹。
Also here is my gradle stacktrace output. 这也是我的gradle stacktrace输出。

tform-1.9.9-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libObjectAL.a 
    -framework MobileCoreServices -Xlinker -sdk_version -Xlinker 12.1 -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks

ld: framework not found FirebaseNanoPB
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I actually do not need to import Firebase Analytics but, i suppose it depend on FirebaseCore etc... 我实际上不需要导入Firebase Analytics,但是我想它取决于FirebaseCore等...

Probably you are using outdated version of RoboPods. 可能您使用的是RoboPods的过时版本。 Latest Firebase bindings are version 5.1.16 and robopod's version of it is 2.2.3-SNAPSHOT. 最新的Firebase绑定是5.1.16版,而robopod的版本是2.2.3-SNAPSHOT。 Also remove all references to Firebase frameworks from robovm.xml, as these are being merged from Robopod itself. 还要从robovm.xml中删除对Firebase框架的所有引用,因为它们是从Robopod本身合并的。
Also check this issue on RoboPods GitHub repository that has similar spelling. 还要在拼写类似的RoboPods GitHub存储库上检查此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM