skip to Main Content

final update:

now everything works;

while before I was not adding internet permission and the app worked perfectly

(contacting API and everything), since the update I have to explicitly modify the manifest.

Easy fix actually:

manifest xmlns:android="http://schemas.android.com/apk/res/android" 

package="com.xxx.xxx"> <uses-permission

 android:name="android.permission.INTERNET"/> <application

 android:name="io.flutter.app.FlutterApplication" android:label="xxx"

 android:icon="@mipmap/ic_launcher"> <activity android:name=".MainActivity"

 [...]

if you are too experiencing the same unexpected changes of behavior in your app.

This might be the cause.

Thank you for your attention.


[update 19/3/2019]:
Facebook user “Momo Roro” described a similar behavior of its own app

asserting that it was caused by the inability of the app

to contact the API, it actually matches my situation,

in fact right after the splash screen my stream should receive

data from an API and route to a specific screen accordingly.

Any idea why it works in debug and not in release build?


I’m iterating an app I’m working on from a while;

I had several release version,

but after updating to flutter
(I curse myself every day for that)

the app works perfectly in debug, but freeze in release build

(although it loads the ‘homemade’ splash screen)

no errors in compile time,

flutter doctor says ok,

I’ve pin my dependencies and added this to
prevent androidX issues

rootProject.allprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'androidx.core') {
                details.useVersion "1.0.1"
            }
            if (details.requested.group == 'androidx.lifecycle') {
                details.useVersion "2.0.0"
            }
            if (details.requested.group == 'androidx.versionedparcelable') {
                details.useVersion "1.0.0"
            }
        }
    }
}

I’ve tried: flutter clean,

flutter build apk –target-platform=android-arm64,

flutter build –release… nothing works

I opened an issue on github, but
I would appreciate if you could point me in the right direction

here you can find some logs

thanks in advance

2

Answers


  1. Chosen as BEST ANSWER

    final update:

    now everything works;

    while before I was not adding internet permission and the app worked perfectly

    (contacting API and everything), since the update I have to explicitly modify the manifest.

    Easy fix actually:

    manifest xmlns:android="http://schemas.android.com/apk/res/android"

    package="com.xxx.xxx">

    android:name="android.permission.INTERNET"/>

    android:name="io.flutter.app.FlutterApplication" android:label="xxx"

    android:icon="@mipmap/ic_launcher">

    [...] if you are too experiencing the same unexpected changes of behavior in your app.

    This might be the cause.

    Thank you for your attention.


  2. Just this week I had a similar problem that had nothing to do with app permissions but rather the gradle configuration.

    I tried different suggestions but what worked for me was downgrading my gradle dependency from 4.1.2 to 3.5.4

    1. Go to android/build.gradle (not android/app/…)
    2. from dependencies, change your gradle version from classpath 'com.android.tools.build:gradle:4.1.2' or any higher version you are using to classpath 'com.android.tools.build:gradle:3.5.4'
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search