I am building an application with Flutter. I implemented an SDK in the android app side. I have no problem with the SDK in a debug APK but when I release, the resources that are needed for the SDK are removed from their containing folder and renamed. For instance: app-debug.apk > res > raw > success.mp3
becomes app-release.apk > res > w3.mp3
I assume that this has to do with proguard but adding -dontshrink -dontobfuscate -dontoptimize
to the proguard file didn't change anything. I've even tried -keep class com.SDK.** { *; }
hoping that this would keep all the resources as well as the classes but to no avail. In the app level build.gradle in the release build type I have also implemented minifyEnabled false
as well as shrinkResources false
but these also did not resolve the issue.
Is there something I am missing about Flutter, Gradle, or even both?
CodePudding user response:
This was a rookie mistake. It had nothing to do with proguard or gradle. The issue came in when I had refactored the package name through File => Project Structure. It refactored everything except the release AndroidManifest so the app was trying to pull the resources from the wrong place on a release.