Google plus ane air native extension failed resolving interface

这一生的挚爱 提交于 2020-01-03 03:00:29

问题


I am attempting to add Google Plus support to an Air mobile app by creating a native extension. The code works in a standalone project however attempting to use it as a native extension produces the following error:

Failed resolving Lcom/myname/ane/sharingextensions/googleplus/GooglePlusConnect; interface 479 'Lcom/google/android/gms/common/api/GoogleApiClient$ConnectionCallbacks;'
04-08 15:51:29.573: W/dalvikvm(19956): Link of class 'Lcom/myname/ane/sharingextensions/googleplus/GooglePlusConnect;' failed

It seems to me that the Google Play Services library is not actually being included in the native extension. The google-play-services_lib project is added as a library project to my native extension project. I have tried extracting the bin/google-play-services_lib.jar file from the google-play-services_lib project and updating my native extension jar with the contents

jar xf /path-to-play-services-project/bin/google-play-services_lib.jar
jar uf ./my_gplus_extension.jar ./android

but this does not seem to fix the problem (all that seems to be in there is a single "UnusedStub.class" file). I have also updated the Android SDK in the Adobe Air directory to version 19 (as described here http://lancelotmobile.com/blog/air-compile-for-android-4/) but this also has had no effect. The offending class is:

public class GooglePlusConnect extends FragmentActivity implements
    ConnectionCallbacks, OnConnectionFailedListener,
    ResultCallback<People.LoadPeopleResult> {

        //Pretty much a clone of the google plus sign-in sample project
    }

It would be great if anyone had any insight into this or can spot any daft mistakes I have made.


回答1:


I think I just answered my own question, seems like I need to be extracting the contents of /path-to-play-services-project/libs/google-play-services.jar which actually contains lots of stuff, and corrects that link error when I update my extension jar file with its contents. The following seems to sort it:

jar xf /path-to-play-services-project/libs/google-play-services.jar
jar uf ./my_gplus_extension.jar ./com


来源:https://stackoverflow.com/questions/22956979/google-plus-ane-air-native-extension-failed-resolving-interface

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!