GameAnalytics / GA-SDK-AIR

Public repository for official GameAnalytics Adobe AIR SDK.
MIT License
5 stars 1 forks source link

Error: GameAnalytics is not configured correctly. Use GameAnalytics.config to set gameKey and gameSecret for the platform you are using. #9

Closed goodamr closed 4 years ago

goodamr commented 4 years ago

I'm using the following code at my Main class:

if(GameAnalytics.isSupported) { GameAnalytics.config .setAutoDetectAppVersion(true) .setGameKeyAndroid("Key-Code") .setGameSecretAndroid("Secret-Code");

GameAnalytics.init();

}

But I got the following code: Error: GameAnalytics is not configured correctly. Use GameAnalytics.config to set gameKey and gameSecret for the platform you are using. at com.gameanalytics.sdk::GameAnalytics$/init()[/Users/mts/dev/github/gameanalytics/GA-SDK-AIR-DEV/actionscript/src/com/gameanalytics/sdk/GameAnalytics.as:56]

Please help !

the1schwartz commented 4 years ago

Hmm ok, I have tried the code in a test project (with real keys of course) and it works fine for me. You are welcome to send us a small test project where is this reproducible

goodamr commented 4 years ago

I'm using the following extensions from Distriqt, maybe there is a conflict:

    <extensionID>com.distriqt.Adverts</extensionID>
    <extensionID>com.distriqt.Core</extensionID>

    <extensionID>androidx.appcompat</extensionID>
    <extensionID>androidx.browser</extensionID>
    <extensionID>androidx.core</extensionID>
    <extensionID>androidx.constraintlayout</extensionID>
    <extensionID>androidx.vectordrawable</extensionID>
    <extensionID>com.google.code.gson</extensionID>

    <extensionID>com.distriqt.playservices.Base</extensionID>
    <extensionID>com.distriqt.playservices.Ads</extensionID>
    <extensionID>com.distriqt.playservices.AdsIdentifier</extensionID>

    <extensionID>com.distriqt.playservices.Auth</extensionID>
    <extensionID>com.distriqt.playservices.Drive</extensionID>
    <extensionID>com.distriqt.playservices.Games</extensionID>
    <extensionID>com.distriqt.GameServices</extensionID>

    <extensionID>com.distriqt.InAppBilling</extensionID>

    <extensionID>com.distriqt.Bolts</extensionID>
    <extensionID>com.distriqt.FacebookAPI</extensionID>
    <extensionID>androidx.cardview</extensionID>
    <extensionID>androidx.recyclerview</extensionID>
    <extensionID>androidx.transition</extensionID>
    <extensionID>com.android.installreferrer</extensionID>
    <extensionID>com.google.android.material</extensionID>
the1schwartz commented 4 years ago

Maybe try to create a new empty project without those extensions but only GA SDK to see if it works then. By that you can check if it has something to do with the extensions or not.

goodamr commented 4 years ago

Thank you for your reply. I have created an empty project - please find it attached - and the error still exists. Note: I'm using flash builder 4.7

GATest.zip

goodamr commented 4 years ago

I forgot to mention that I'm also using the following libraries:

the1schwartz commented 4 years ago

We don't have a license for Flash Builder license unfortunately. I have built and tested using the command line for AIR SDK. I use the AIR SDK 33

goodamr commented 4 years ago

If you are interested to check the error, you can download a trial version of Adobe Flash builder: https://www.adobe.com/products/flash-builder-standard.html

the1schwartz commented 4 years ago

Thanks but I don't seem be able to find the download button for trial

the1schwartz commented 4 years ago

Screenshot 2020-08-27 at 14 55 15

I just see this then scrolling a bit down on the page

goodamr commented 4 years ago

Hmm ok, I found a direct download link here: http://download936.mediafire.com/y5wkj7nww6xg/95xp8qru7c9jz7q/FlashBuilder_4_7_LS10_win64.zip

I downloaded it and it is working fine.

the1schwartz commented 4 years ago

Thanks what version of the AIR SDK are you using? When I installed the Flash Builder it only had AIR SDK 3.4 installed but GA SDK needs AIR SDK 33. Just want to check that you have updated to the latest version of AIR SDK.

goodamr commented 4 years ago

I'm using the lastest AIR SDK 33.1.1.217 https://airsdk.harman.com/download

the1schwartz commented 4 years ago

Ok great just wanted to double-check. Going to test now.

the1schwartz commented 4 years ago

Ah sorry I see what the problem is: if(GameAnalytics.isSupported) is not supposed to be there so remove that. It works if I remove that. I created a new "ActionScript Mobile Project", add the GameAnalytics AIR SDK, run it and then it works. Sorry I didn't see that small error. Hope it works for you as well.