0

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

5
  • If you checkout the previous version of flutter does your release build run the right way? Commented Mar 18, 2019 at 16:09
  • before upgrading worked perfectly, how can I downgrade the flutter version? Commented Mar 19, 2019 at 5:04
  • [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? Commented Mar 19, 2019 at 5:10
  • Depending on your flutter version with flutter version 1.0.0 or flutter version --force 1.0.0 if you want to use version 1.0.0. Be awere that if you have local modification of flutter repo you need to stash them or revert and readd them manually. Commented Mar 19, 2019 at 5:11
  • I was facing similiar issues in 'barcode_scan' library with ver 1.0.0. switching the library ver to 0.0.8 solved all issues Commented Nov 18, 2019 at 12:03

2 Answers 2

0

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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'

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.