damnedpie / godot-appodeal

Appodeal 3.3.3 SDK plugin for Godot Engine Android export.
MIT License
4 stars 0 forks source link

App crash #1

Closed stromperton closed 1 year ago

stromperton commented 1 year ago

Game closes after start like other peoples describe it here

damnedpie commented 1 year ago

Hello. A logcat is required to precisely understand what causes the crash. I can look into it if you dump it here.

The issue in PoqXert's repo is not very useful to this plugin, because (though partially based on their work) it's a brand-new plugin for a brand-new SDK. Appodeal 3.x API and Appodeal 2.x API have some differences.

With that being said, I currently have 2 games live on Google Play with about 4000 active players and in both these games I use this plugin and the crashrate is non-existent (and is not caused by any of the plugins I use, but by Godot-related issues).

I have also used PoqXert's plugin too. I ran into the same issue that time; ramping up the compileSDK and recompiling the plugin did the job for me.

Try checking the following: 1) In your game's config.gradle (project/android/build directory), make sure that:

Inside the Godot editor in the Android Export preset that you are using, you should set Min Sdk to 21 and Target Sdk to 30. Setting Target Sdk to 31 there does nothing, it gets overridden by Godot and replaced by 30 anyway.

2) Try rebuilding the plugin for your Godot version. I use Godot 3.4.4 and the plugin's AAR was built with Godot 3.4.4's export template. Rebuilding is extremely easy, just grab this repository and run .\gradlew build from plugin project root directory. Make sure to provide actual Godot build template (godot-lib.release.aar) for the engine version you are using at godotappodeal\libs folder.

Let me know if this helped, I might update repository README and add a "Troubleshooting" section. But what I really advise is running a non-filtered logcat and just studying everything that it traces from your app's start to the crash.

UPD: you can send me a link to download your project or a debug export APK of your game (doesn't really matter) and I can try looking into the logcat. Also if you use my GodotAppodeal.gd script, make sure to open your Godot project, go to Project -> Settings and add a new "Appodeal/AppKey" String property like I mention in README.

stromperton commented 1 year ago

Thank you for so detailed answer! I use Godot 3.4.4 too. My tries with sdk's versions no went me to the win.

I guess problem may be in empty AppKey (i have not it yeat) or no admob stings in AndroidManifest (can you explain how to disable admob if it is root of trooble, please?) My apk

damnedpie commented 1 year ago

I have updated the README about this all.

In short words, yes - you should provide an AppKey in the Project Properties as mentioned in Readme. Not having it should cause crash in godot_appodeal.gd _ready() function.

Google Admob Adapter causes crashes or black screens if you don't provide a valid Google Ad APP ID for it. I came up with 2 workarounds for this issue, please see the updated Readme.

I have also pushed new commits that fix some potential Java-crashes related to updated Appodeal API (initialization callbacks in particular), so please make sure to download new release (rev.2) or rebuild the repo.

Please let me know if this helped. If so, I will close the issue. :D

stromperton commented 1 year ago

Thank you a lot! Can I get valid test AppKey for Appodeal? (how this provide by AdMob testing App ID). I read Appodeal docs, but can't find something like appodeal-xxxxxxxxxxxxxxxx-yyyyyyyyyy. Do I need use .setTesting(true) func before inicializaion? My project can't find singleton of Appodeal. If i provide valid AppKey Godot should succcesfull get singleton?

UPD: If not exist any testing appodeal keys, I try you recomendation after get real key in next days

damnedpie commented 1 year ago

There is no such thing as test Appodeal key, you just add a new app into your Appodeal dashboard and the key gets generated (doesn't matter if your game is live on Google Play or not).

You can set testing as true after initialization, no problem with that. When you summon ads in testing mode, an Appodeal banner would show instead of real ads.

If your project can't find Appodeal singletone, check if you have Appodeal enabled in your Android Export settings in Godot Editor (you need to tick the checkbox there).

stromperton commented 1 year ago

Very good explain and work! I escaped app crash problem! (finally set remote debugging 😄)