Repository navigation
Can't run application in release mode #14385
Copy link
Copy link
Closed
Labels
e: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Steps to Reproduce
run flutter run --release
Flutter recognizes my real phone as emulator and won't run application in release mode
Logs
Release mode is not supported for emulators.
Flutter Doctor
[√] Flutter (on Microsoft Windows [Version 10.0.16299.192], locale en-US, channel alpha)
• Flutter version 0.0.21 at C:\Users\Braulio\flutter
• Framework revision 2e449f06f0 (35 hours ago), 2018-01-29 14:26:51 -0800
• Engine revision 6921873c71
• Tools Dart version 2.0.0-dev.16.0
• Engine Dart version 2.0.0-edge.da1f52592ef73fe3afa485385cb995b9aec0181a
[√] Android toolchain - develop for Android devices (Android SDK 27.0.2)
• Android SDK at C:\Users\Braulio\AppData\Local\Android\sdk
• Android NDK at C:\Users\Braulio\AppData\Local\Android\sdk\ndk-bundle
• Platform android-27, build-tools 27.0.2
• Java binary at: C:\Program Files\Android\AndroidStudio3.0\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[√] Android Studio (version 2.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[√] Android Studio (version 3.0)
• Android Studio at C:\Program Files\Android\AndroidStudio3.0
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[√] IntelliJ IDEA Ultimate Edition (version 2017.2)
• Flutter plugin version 18.2
• Dart plugin version 172.4343.25
[√] Connected devices
• SM A510F • 3300706128e61383 • android-arm • Android 7.0 (API 24) (emulator)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
e: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
PapyElGringo commentedon Feb 16, 2018
Same for me and same phone:
jack4git commentedon Mar 3, 2018
Same here:
jack4git commentedon Mar 3, 2018
See also #10203, which was closed. Regressed perhaps or more unrecognized devices ...
vilkh3m commentedon Mar 14, 2018
same on samsung J7 (SM-J730F)
nevi-me commentedon Mar 28, 2018
The whitelisted devices at #10203 are too narrow
EDIT: Looks like beta branch is behind, because I've run
flutter upgradeand still end up with Flutter that's 5 weeks old. The devicesamsungexynos7870was added to 568ce69 which is in v0.2.4, but I'm still on v0.1.5. @jack4git this might apply to you tooMine is:
ethael commentedon Nov 8, 2018
Another device is SM G390F (Samsung Galaxy XCover 4)
randolfo75 commentedon Jan 18, 2019
Same here:
SM A520F • 5210ff6a5aeeb30f • android-arm64 • Android 8.0.0 (API 26) (emulator)
It is a device though.
Miiite commentedon Jan 25, 2019
Same thing with a samsung A8. Seems like all samsungs are detected as emulators ?:
SM A530F • 5200fdb0b4db854d • android-arm64 • Android 8.0.0 (API 26) (emulator)
I also have a Sony Xperia Z5 compact, and I have no issues with this one.
zoechi commentedon Jan 25, 2019
Don't forget to thumbs-up the initial issue to raise priority.
allandaleho commentedon Feb 19, 2019
For a workaround, what I did is run
flutter build apkand thenflutter install.This should help in running the application in release mode for unsupported android device. (tested with 1 samsung device)
Hope this helped!
samuelhnrq commentedon Mar 9, 2019
I was simply going to add that my A8 (A530F) is also not being recognized but that have already been reported, and sincerely, is the current solution the best? Someone has to create a pull request to every new Samsung device?
11 remaining items
zanderso commentedon Jan 24, 2020
@chunhtai Were there any PRs landed related to this issue, or any offline discussion about this that you can summarize here?
zanderso commentedon Jan 24, 2020
/cc @blasten
blasten commentedon Jan 24, 2020
I'm unable to repro this issue on master, so it's probably fixed. :)
alex-myznikov commentedon Jan 27, 2020
@chunhtai I had to add
'samsungexynos7880': _HardwareType.physicalto get my Samsung SM-A520F considered as a real device on SDK version1.12.13+hotfix.5. Can you, please, add it to the whitelist?chunhtai commentedon Jan 27, 2020
There is no fix landed for this issue, and it is currently rely on manual change to whitelist each device that has this problem.
darrylsepeda commentedon Feb 21, 2020
I developed using mac and debug it in ios simulator, but when I tried to build apk for android and I run
flutter run --releaseI got the same errorRelease mode is not supported for emulators..The apk generated from flutter is in debug mode, so I couldn't test it via play store.
Have checked to other issues as well related to this --release command, seems no solution at all.
I also tried this, but it doesn't work.
I put
'iPhone 11 Pro Max': _HardwareType.physical,, eventhough I know this should be for android and what I want to build is apk. This is really annoying!darrylsepeda commentedon Feb 21, 2020
Is it because I have another devices (web mode is on)?
zanderso commentedon Feb 24, 2020
@chunhtai If you think this issue needs more thought/work, could you re-open it and give it a better title? Thanks!
chris097 commentedon Mar 17, 2020
Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.zip.ZipFile.(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:214)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:74)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
[!] Gradle threw an error while trying to update itself. Retrying the update...
Running Gradle task 'assembleDebug'...
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.zip.ZipFile.(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:214)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:74)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
[!] Gradle threw an error while trying to update itself. Retrying the update...
Finished with error: Gradle task assembleDebug failed with exit code 1
chris097 commentedon Mar 17, 2020
This issue is killing me how do solve this....
Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.zip.ZipFile.(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:214)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:74)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
[!] Gradle threw an error while trying to update itself. Retrying the update...
Running Gradle task 'assembleDebug'...
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.zip.ZipFile.(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:214)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:74)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
[!] Gradle threw an error while trying to update itself. Retrying the update...
Finished with error: Gradle task assembleDebug failed with exit code 1
lock commentedon Apr 19, 2020
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.