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

qr_code_scanner does not work in app-release.apk, but work in app-debug.apk. #683

Open
azzamt11 opened this issue Aug 2, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@azzamt11
Copy link

azzamt11 commented Aug 2, 2023

I cannot give the precise description of the bug since it is on app-release.apk thou. It is impossible for me to trace what is wrong with the app. For the records. I have updated all the dependencies, minSdkVersion, and Flutter Sdk to the last version, and not only that, I also tried downgrading Flutter Sdk into several version to check which one is working, but no hope. please tell me what to do sir.

@azzamt11 azzamt11 added the bug Something isn't working label Aug 2, 2023
@azzamt11 azzamt11 changed the title qr_code_scanner, and qr_code_dart_scan does not work in release-apk, but work in debug-apk. qr_code_scanner, and qr_code_dart_scan does not work in app-release.apk, but work in app-debug.apk. Aug 2, 2023
@azzamt11 azzamt11 changed the title qr_code_scanner, and qr_code_dart_scan does not work in app-release.apk, but work in app-debug.apk. qr_code_scanner does not work in app-release.apk, but work in app-debug.apk. Aug 2, 2023
@Leylan24
Copy link

you can try disabling minifyEnabled and shrinkResources in your build.gradle

buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.debug
        shrinkResources false
        minifyEnabled false
    }
}

@AbhishekpYoungsoft
Copy link

hi leylan, yes did changed the build.gradle file as above, still the issue persists, please provide approriate solution, thanks in advance

@AbhishekpYoungsoft
Copy link

hi leylan, yes did changed the build.gradle file as above, still the issue persists, please provide approriate solution, thanks in advance

@JeffTyfoom
Copy link

Up! I also experience the same issue.

@el2zay
Copy link

el2zay commented Feb 20, 2024

I had this problem because an Expanded widget had been misplaced. Please check this.

Before:

    return Expanded(
      flex: 5,
      child: Stack(
        // ... 

After

return Column(
      children: [
        Expanded(
          flex: 5,
          child: Stack(
          // ...

I got this error by debugging on a real iOS device.

═╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown while applying parent data.:
Incorrect use of ParentDataWidget.
The ParentDataWidget Expanded(flex: 5) wants to apply ParentData of type FlexParentData to a
RenderObject, which has been set up to accept ParentData of incompatible type
MultiChildLayoutParentData.
Usually, this means that the Expanded widget has the wrong ancestor RenderObjectWidget. Typically,
Expanded widgets are placed directly inside Flex widgets.
The offending Expanded is currently placed inside a CustomMultiChildLayout widget.
The ownership chain for the RenderObject that received the incompatible parent data was:
  Stack ← Expanded ← KeyedSubtree-[GlobalKey#42a2e] ← _BodyBuilder ← MediaQuery ←
LayoutId-[<_ScaffoldSlot.body>] ← CustomMultiChildLayout ← _ActionsScope ← Actions ← AnimatedBuilder
← ⋯

When the exception was thrown, this was the stack:

Hope this helps 🙌

@EAHOG
Copy link

EAHOG commented Jun 20, 2024

same...

@Clothless
Copy link

I had the same issue for a couple of days, and i finally got a solution.
The widget is wrapped in Expanded() right?
Just remove that Expanded(), that solves the problem for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants