How can I accomplish this? Is there some secret sauce for the project.xml file, or am I supposed to hack one of the build.gradle files in the ./export directory tree?
It’s possible to customize the template that Lime/OpenFL uses for a particular target.
You can use the <template/> tag in your project.xml file to specify a directory with files to use instead of the ones in lime.
Your custom template directory should follow the same directory structure as Lime’s template directory here. So, if you want to customize one or more files in the Android template, you’d create an android subdirectory and make sure that the files have the same name inside there to override the ones that Lime provides by default.
In Lime, it looks like there are multiple _build.gradle_files. I’m not sure which one you want to customize. One is located at templates/android/template/build.gradle and another is at templates/android/template/app/build.gradle.
So, if you added <template path="mytemplates"/> in your project.xml file, you could create a file in your project named mytemplates/android/template/build.gradle or mytemplates/android/template/app/build.gradle. Just copy the one from Lime, and then tweak what you need to be different.
I should make myself clear that you don’t need to copy every file from Lime’s templates directory. Copy only the files you need to modify, and Lime will know to grab the rest of the defaults that are missing.
Could not find method debugSymbolLevel() for arguments [SYMBOL_TABLE | FULL] on object of type com.android.build.gradle.internal.dsl.NdkOptions.
There could be two problems, as I understand it. One, since OpenFL uses the older android_ndk_r15c, this feature may not even be available. It seems odd, since symbol tables are ubiquitous, but r15c is from long before app bundles.
The other potential issue is that the android gradle plugin requires this version
That’s closer still. I aimed lime at n21e and set the gradle versions. Gradle does recognize debugSymbolLevel now. But I’m getting an error:
Build-tool 31.0.0 is missing DX at /home/user/Android/Sdk/build-tools/31.0.0/dx
Which indeed is missing from my Sdk. I’ve reinstalled the build-tools (from Android Studio), but it’s still not showing up. What package does this (Dalvik compiler?) get installed from?
Thank you, I was able to build by soft linking d8 and d8.jar to dx and dx.jar. I’m not sure symbol info was included in the .aab, but when I went verify, GooglePlay rejected the build because the app is now requesting
android.permission.READ_PHONE_STATE
and requires a “privacy policy” but doesn’t specify how to satisfy this requirement. How did you get around this? Is it possible to simply not ask for this new permission? Can it be done from project.xml or must I include a custom android.manifest now? Or did you provide this policy through the Play Console, somehow?
uses-permission#android.permission.READ_PHONE_STATE
IMPLIED from ./export/android/bin/app/src/main/AndroidManifest.xml:2:1-37:12 reason: org.haxe.extension has a targetSdkVersion < 4
I had already read that thread. The READ_PHONE_STATE one gets added as a blanket default when a sdk version isn’t specified in a manifest. That’s why I tried adding versions to the extension-api manifest. But that didn’t work. What I’d like to do is remove the request for that permission. I don’t want it at all, as it makes GooglePlay need a privacy policy. I was hoping you might have some insight, but since you’re using admob, I think you actually want that permission.
Update: there’s a bug in Lime that doesn’t read the sdk versions in extention-api’s mainfest correctly. There’s also a commit which simply uses project.xml’s versions instead. Details:
I need to follow up to verify if debug symbols were actually included. But they weren’t at first glance, so that issue remains in progress. :-/
Anyone made it work to get debug symbols?
using ndkr21e, adjusted the gradle version, got the gradle template working,
but neither do i have a native-debug-symbols.zip nor a cmake-folder to zip it myself.
and last but not least
gradle-version=“6.7.1”
gradle-plugin=“4.1.3”
tried many recombinations of all those settings.
In a lot of them it does get created ( the data exists is in the intermediates folder), BUT not in the bundle
Not sure if there is a downside with using an older plugin, but happy that it finally works