[英]Flutter apk doesn't work in android device
我嘗試為我的 flutter 應用程序生成 apk 文件,我在flutter clean
命令之后使用flutter build apk --release
命令。 請注意,使用flutter build apk --release
命令后,我收到此錯誤:
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.
之后,我從這個路徑獲得了 apk 文件: C:\project_path\build\app\outputs\apk\release
,但是當我嘗試從手機安裝這個 apk 時,我app not installed
:
注意:我嘗試過不止一種設備具有不同的 android 版本。
請幫我解決我的問題。
似乎是警告,而不是錯誤,因此應該生成 apk。
無論如何,您是否檢查了硬件架構?
例如,嘗試為您的智能手機指定架構:
flutter 構建 apk --target-platform android-arm64
flutter 構建 apk --target-platform android-arm (<-- arm 32 位)
ETC...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.