Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17111

SDKBOX Play plugin fails on Android

$
0
0

@pccsoares wrote:

I’ve been trying to add the SDKBOX Play plugin to work on Android for several days, but nothing happens when I try to show the Achievements.
Logs show:

 E SignInAuthenticator: **** APP NOT CORRECTLY CONFIGURED TO USE GOOGLE PLAY GAME SERVICES
 E SignInAuthenticator: **** This is usually caused by one of these reasons:
 E SignInAuthenticator: **** (1) Your package name and certificate fingerprint do not match
 E SignInAuthenticator: ****     the client ID you registered in Developer Console.
 E SignInAuthenticator: **** (2) Your App ID was incorrectly entered.
 E SignInAuthenticator: **** (3) Your game settings have not been published and you are
 E SignInAuthenticator: ****     trying to log in with an account that is not listed as
 E SignInAuthenticator: ****     a test account.
 E SignInAuthenticator: ****
 E SignInAuthenticator: **** To help you debug, here is the information about this app
 E SignInAuthenticator: **** Package name         : org.cocos2dx.cocosv4_SDKBOX
 E SignInAuthenticator: **** Cert SHA1 fingerprint: 7...
 E SignInAuthenticator: **** App ID from manifest : 718695189001
 ...
 W SignInActivity: ==> Returning non-OK result: 10002
 ...
 E AbstractServiceBroker: Getting service failed
 ...
 E AbstractServiceBroker: java.lang.NullPointerException: Account cannot be null.

I’m pretty sure that the package name is correct, and the app ID and SHA1 is the same as I have on the Developer Console.

I’m using cocos2d-x v4.0.

Created a new project from scratch, and published the game services as instructed on the plugin page.

These were the steps I followed:

  1. on CMakeLists.txt added

     if(ANDROID)
     	 	add_definitions(-DSDKBOX_ENABLED)
         	add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/jni/PluginSdkboxPlay/)
         	target_link_libraries(${APP_NAME} ext_PluginSdkboxPlay)
         	add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/jni/sdkbox)
         	target_link_libraries(${APP_NAME} ext_sdkbox)
     	endif()
    
  2. on the appdelegate.cpp added sdkbox::PluginSdkboxPlay::init();
    and on the HelloWorldCpp.cpp ->
    sdkbox::PluginSdkboxPlay::signin();
    sdkbox::PluginSdkboxPlay::showachievements

  3. Resources-> sdkbox_config.json with the leaderboard and achievements ID

  4. manifest XML, added


    and

  5. added the App ID to strings.xml on \proj.android\app\res\values

  6. copied PluginSdkboxPlay.jar and sdkbox.jar to proj.android/app/libs

  7. copied PluginSdkboxPlay and pluginsdkbox folders to JNI

  8. on proj.android\app\src\org\cocos2dx\cpp\AppActivity.java added the SDKBOX activity

  9. on app/build.gradle had to set minifyEnabled and shrinkResources to false, otherwise I was getting the error: SdkboxPlay: failed to get configuration

  10. updated gradle version to com.android.tools.build:gradle:3.5.1

And I can see the signin to Google Play on the beginning of the game, but nothing happens when the showAchievements or showLeaderboards are called.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>