question

evgenia-gapon avatar image
evgenia-gapon asked

GameCircle Unity Plug-In AmazonGamesJNI crash

Hi all, I followed the instructions https://developer.amazon.com/sdk/gamecircle/documentation/unity-gamecircle-setup.html but got an error when running AGSJniHandler(14373): Could not load AmazonGamesJni Сan someone explain how to fix it? (Unity 4)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

evgenia-gapon avatar image
evgenia-gapon answered
Full log W/dalvikvm(14373): No implementation found for native Lcom/amazon/ags/jni/AGSJniHandler;.isLoaded ()V I/AGSJniHandler(14373): AmazonGamesJni is not loaded, trying to load library E/AGSJniHandler(14373): Could not load AmazonGamesJni E/AGSJniHandler(14373): java.lang.UnsatisfiedLinkError: Couldn't load AmazonGamesJni: findLibrary returned null E/AGSJniHandler(14373): at java.lang.Runtime.loadLibrary(Runtime.java:429) E/AGSJniHandler(14373): at java.lang.System.loadLibrary(System.java:554) E/AGSJniHandler(14373): at com.amazon.ags.jni.AGSJniHandler.loadLibrary(AGSJniHandler.java:49) E/AGSJniHandler(14373): at com.amazon.ags.api.AmazonGamesClient. (AmazonGamesClient.java:61) E/AGSJniHandler(14373): at com.amazon.ags.api.unity.UnityClientProxyBase. (UnityClientProxyBase.java:15) E/AGSJniHandler(14373): at com.amazon.ags.api.unity.AchievementsClientProxyImpl. (AchievementsClientProxyImpl.java:32) E/AGSJniHandler(14373): at com.amazon.ags.api.unity.AchievementsClientProxyImpl.getInstance(AchievementsClientProxyImpl.java:38) E/AGSJniHandler(14373): at com.unity3d.player.UnityPlayer.nativeRender(Native Method) E/AGSJniHandler(14373): at com.unity3d.player.UnityPlayer.onDrawFrame(Unknown Source) E/AGSJniHandler(14373): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363) E/AGSJniHandler(14373): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118) W/GameCircleClient(14373): AmazonGamesClient is not initialized. Please call AmazonGamesClient.initialize() first.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Evgenia, Thank you for posting. This is happening due to incorrect GameCircle SDK configuration. Below are the steps to follow in order configure the sdk in your project if you are using eclipse as an IDE. After importing the GameCircle SDK into your workspace add it as a dependency of the application project in which you will use it. This step enables you to compile your project against the GameCircle library, and ensures that the GameCircle jars are packaged with your APK. 1. Go to your project properties. 2. Click Android, and in the Library section near the bottom of the screen, click Add. 3. Select GameCircleSDK. 4. Click OK. Please follow this link for more information : https://developer.amazon.com/sdk/gamecircle/documentation/gamecircle-init.html#Section3 If you are using any other IDE like intellij or Android Studio, you can manually copy jni, libs and res folder from Android/GameCircle/GameCircleSDK to your project from the Apps-SDK zip.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

evgenia-gapon avatar image
evgenia-gapon answered
Hi Sujoy, Thanks for the help. We have added the files from GameCircleSDK\jni and GameCircleSDK\libs in the plugins folder of our project (sources\Unity\Assets\Plugins\Android) and the problem was resolved
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.