How can I use Proguard/R8 with my solar2d app?

Hi, I did build my first app using solar2d, and made all steps needed to publish its .aab file in google play console.

But it gave me on last Publish button step two errors: (I will translate the meaning of Errors as I have them in Arabic Language)

  1. App Bundle doesn’t contain anti-obfuscator,
  2. the App Bundle contains original programming code and I need to load a debugger file to correct ANR errors.

I searched internet and found that there is a tool called Proguard or R8 to shrink, pre-verify, optimize, and obfuscator the code of the app before publishing.

and I saw it in “Android Studio” in the file “build.Gradle” as parameter can be turned on/off like minify and shrink.

How could I add these parameters to my solar2s app, as I saw “build.setting” file doesn’t include them as a possibility?

Thank you

Those are just warnings. I wouldn’t worry. Don’t worry about the little stuff and keep improving your game.

For you to modify those settings you will need a native build. Look here and in the documentation for how to do that.

Thanks a lot… yes you are right.

I used your advice and it worked out :ok_hand:

There is a way to deal with the second warning.

If you go to the Solar 2D builds page and find the version of Solar 2D that you are using, the assets section should also show a file called “AndroidDebugSymbols-version.number.zip”. So if you are using version 3663 it would be “AndroidDebugSymbols-2021.3663.zip”.

Download that file, and then upload it to Google Play:

App Bundle Explorer (left hand menu) > Downloads tab > Native debug symbols > Upload the zip file

That will get rid of the warning, and more importantly will make your crashes and ANR reports a bit easier to read.

Edit: You’ll need to upload the file each time you upload a new build to Google Play, even if you used the same version of Solar2D to build the app.

3 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.