Reputation: 47
Linux Mint 21.1 Cinnamon Linux Kernel 5.15.0-84-generic
cordova 11.1.0 cordova-android 11.0.0 cordova-ios 6.2 node 16.19.0
Java JDK: 11.0.20 Gradle: 8.1.1 Android target: android-33,android-32,android-31,android-30,android-29
After i update my app to use cordova 11.1 (before it was 10), cordova-android 11 (before it was 9) to target android 33 (before it was 30), when i tried to get the data of BuildInfo on javascript, the plugin return all data as null, empty strings or zero value. This happens only when i build the app with cordova build --release android --buildConfig
, because when i use cordova build --debug android --buildConfig
it works fine. The only difference of these commands is "--debug" generate an ".apk" and "--release" generates an ".aab".
This happens only on android, ios works fine.
I suppose that some of the updates change something that broke the plugin.
I tried to regenerate the android folder.
Upvotes: 0
Views: 73
Reputation: 47
I am using another plugin named cordova-plugin-proguard. I had to create a 'proguard-custom.txt' file with the following configuration:
-keep public class **.BuildConfig { *; }
As far as I understand, this configuration tells Proguard not to obfuscate the class that cordova-plugin-buildinfo uses to capture the data.
I followed the instructions provided by the repository owner after they responded to my issue. Link to my issue response: https://github.com/lynrin/cordova-plugin-buildinfo/issues/24
Upvotes: 0