Flutter app show grey screen in release mode but works fine in debug mode Instance of 'DiagnosticsProperty'

前端 未结 4 2204
故里飘歌
故里飘歌 2020-12-29 05:42

I notice that the app works fine in debug mode but when I try the apk on my phone the app shows a grey screen after the loading screen. when i used https and i adding all pe

4条回答
  •  臣服心动
    2020-12-29 05:55

    first, you check AndroidManifest.xml (AndroidManifest.xml file for debug mode is different from AndroidManifest.xml file for release mode. check directory:

    android\app\src\debug\AndroidManifest.xml
    

    and directory:

    android\app\src\main\AndroidManifest.xml
    

    even you can create for release:

    android\app\src\release\AndroidManifest.xml
    

    try with add

    
    

    to your target AndroidManifest.xml).

    red screen in debug mode it's like grey screen in release mod that means you have an error code but for debug mode maybe this error be like warning and could run and you don't see any problem in your app in debug mode! but for release mode, you should fix it! like the case for me: I'm trying put Position Widget in Container Widget and I get this error :

    Another exception was thrown: Instance of ‘DiagnosticsProperty’
    Incorrect use of ParentDataWidget.
    

    i fix it by change Container to Stack.

提交回复
热议问题