Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't load on release #339

Closed
bagintz opened this issue Mar 1, 2019 · 12 comments
Closed

Won't load on release #339

bagintz opened this issue Mar 1, 2019 · 12 comments

Comments

@bagintz
Copy link

bagintz commented Mar 1, 2019

For some reason when I do a simple flutterWebviewPlugin.launch for release it does not work, but a regular build (debug) does. I am sure I am missing something simple. Any ideas?

@hyvikk
Copy link

hyvikk commented Mar 27, 2019

I have same issue.

@charafau
Copy link
Collaborator

charafau commented Apr 2, 2019

Can you please give more info? Plugin version, Android / iOS / both, error log if possible.

@charafau
Copy link
Collaborator

charafau commented Apr 3, 2019

also, might be related to this one ? #239

@harsha973
Copy link

@charafau ,

I'm facing the same issue in my project. For demo, created a basic sample to load "https://google.co.nz". Git sample here.

It works perfectly in debug mode. With release APK, Webview cant load the url. Please find the screen shot below.

Screenshot_20190418-091524

Flutter doctor here

    • Flutter version 1.2.1 at /Users/sree/Work/Installation/flutter
    • Framework revision 8661d8aecd (9 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/sree/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/sree/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2, Build version 10E125
    • ios-deploy 1.9.4
    • CocoaPods version 1.6.1

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] Connected device (1 available)
    • Pixel 3 • 89TX0FYE3 • android-arm64 • Android Q (API 28)

I think I'm missing something real small info. Any leads please?

And this on not related to #239.

@ghost
Copy link

ghost commented Apr 21, 2019

I have same issue too.

@ghost
Copy link

ghost commented Apr 21, 2019

it workes in profile mode

@harsha973
Copy link

Anyone got a working solution?

@harsha973
Copy link

harsha973 commented Apr 29, 2019

FIXED

It's a small permission issue on Android. Added <uses-permission android:name="android.permission.INTERNET"/> to AndroidManifest.xml and webview loads url in release mode 🎉

For reference, I have a basic Git sample here

But not sure why it works in debug mode though 🤔

@charafau
Copy link
Collaborator

charafau commented May 3, 2019

Sorry I was out for some time. Yes.. you need to have Internet permission - it's added by default in debug mode (that's why you can hot reload code) but seems like it's stripped on release mode. Closing this one!

@Maulik009
Copy link

No its still gives me error while generating apk from release mode.

@charafau
Copy link
Collaborator

@Maulik009 need more info, some logs, code..

@MahiMahionly
Copy link

get the Release APK from this command in terminal: ** flutter run --release **.
This Will Definitely Solve Your All Those Problems..
Also It have less MB output than Getting Release Apk from Build ->Flutter->Build Apk ...etc .
:)Mahi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants