Reputation: 134
I've build the apk file for the app I'm working on with the command flutter build apk --split-per-abi
. It worked without any warnings.
However, when I try to install the app on my phone, it doesn't open. I get a message saying the app has been installed correctly and I even see the app with its custom icon, but when I go to open it it doesn't work.
This is my build.gradle
, in case that's helpful
android {
compileSdkVersion 31
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "<ID>"
minSdkVersion 23
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Edit: I deleted my build with flutter clean
and when I build the apk again I got the following errors.
Building with sound null safety
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\path_provider-2.0.6\android\src\main\java\io\flutter\plugins\pathprovider\PathProviderPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-2.5.4\android\src\main\java\io\flutter\plugins\firebase\firestore\streamhandler\TransactionStreamHandler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\printing-5.6.0\android\src\main\java\net\nfet\flutter\printing\PrintingPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Running Gradle task 'assembleRelease'...
Upvotes: 0
Views: 1437
Reputation: 1192
Did you try running the app in the release mode?
To run the app in the release mode, try this-
flutter run --release
This way, you'd be able to see what bugs are being triggered at the runtime and debug accordingly.
To the best of my knowledge, I believe it MAY HAVE something to do with the proguard rules.
Upvotes: 1