简体   繁体   中英

Flutter apk doesn't work in android device

I try to generate apk file for my flutter app, I used flutter build apk --release command after flutter clean command. note that after used flutter build apk --release command I got this error:

Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\android_intent-0.3.7+3\android\src\main\java\io\flutter\plugins\androidintent\MethodCallHandlerImpl.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\url_launcher-5.4.5\android\src\main\java\io\flutter\plugins\urllauncher\WebViewActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

After that, I got the apk file from this path: C:\project_path\build\app\outputs\apk\release , but when I try to install this apk from the mobile I got this app not installed :

在此处输入图像描述

note: I'm tried more than one device with a different android version.

Please help me to solve my problem.

Seems to be warnings, not errors, thus the apk should be generated.

In any case, did you check the hardware architecture?

For example, try to specify the architecture for your smartphone:

flutter build apk --target-platform android-arm64

flutter build apk --target-platform android-arm ( <-- arm 32 bits)

etc...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM