AdvertisingIdClient.getAdvertisingIdInfo(context) is thworing NoClassDefFoundError

后端 未结 1 949
礼貌的吻别
礼貌的吻别 2021-01-06 10:07

I am trying to use AdvertisingIdClient to fetch the advertisement id of my AIR app. So i did like AdvertisingIdClient.Info adInfo = AdvertisingIdClient.getAdvertisingI

相关标签:
1条回答
  • 2021-01-06 11:07

    When creating the ANE you should ideally extract the google-play-services classes from the JAR and include them inside your ANE's JAR. See this.

    If the classes are still missing inside the final APK itself, check out my question (and subsequently my answer) to a similar issue. I was trying to integrate the latest Google play services SDK into our game and I noticed that the dx tool in the AIR SDK was stripping out the Google play classes. You can confirm this by using this tool to verify whether those classes are indeed missing in the final APK.

    UPDATE:

    I previously injected the required classes into the APK using the same dex2jar tool mentioned above. But that is not necessary. You can simply update the dx tool inside the AIR SDK.

    0 讨论(0)
提交回复
热议问题