问题描述
我是Flutter编程的新手,我已经创建了一个演示应用程序,它在Android和iOS设备上都可以正常运行.我想在颤动中看到.apk和.ipa文件.谁能帮助我从扑朔迷离中获取这些文件?我在哪里可以在文件夹中看到这些文件,或者还有其他解决方案.
推荐答案
对于Android,每次构建应用程序时都会生成APK,例如使用flutter run.您会在<project>/build/app/outputs/apk/debug/app-debug.apk下的项目文件夹中找到.如果您想发布apk,请查看 docs .
我不是iOS人,因此我不确定在开发过程中像Android一样生成IPA.但是,查看这些文档似乎您可以按照Xcode上的标准步骤来获得它,如所示<在这里.
其他推荐答案
对于APK(Android),您需要运行命令:
flutter build apk --release
如果要拆分每个ABI(拆分APK),则运行
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
对于IPA(iOS),您需要运行命令:
flutter build ios --release
来自控制台
P.S. --release是可选的,因为默认情况下是可选的 如果您需要调试构建,只需将--release替换为--debug
您可以找到已发布的APK或IPA文件表单
build/app/outputs/flutter-apk/app-release.apk
其他推荐答案
对于APK(Android)运行命令:
flutter build apk --release
for ipa(ios)运行命令:
flutter build ios --release
然后获取实际.IPA文件,请打开xcode-> product-> archive->分配应用程序 - > ad hoc->导出
您可以将.ipa(在Runner文件夹中)保存在任何位置
中问题描述
I am new to flutter programming and I've created a demo app, its running fine on both android and iOS devices. I want to see .apk and .ipa file in flutter. Can anyone help me to get these files from Flutter? Where can I see these files in folders or is there any other solution.
推荐答案
For Android an APK is generated every time you build the app, e.g. with flutter run. You will find that in your project folder under <project>/build/app/outputs/apk/debug/app-debug.apk. If you want a release APK, have a look at the docs.
I'm not an iOS person, so I'm not sure an IPA is generated during development as in android. But looking at these docs it seems you can follow the standard steps on xcode to get it, as shown here.
其他推荐答案
For apk (Android) you need to run the command :
flutter build apk --release
If you want to split the apks per abi (Split Apk) then run
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
For ipa (iOS) you need to run the command :
flutter build ios --release
From the console
P.S. --release is optional as it is by default if you need debug build, just replace --release with --debug
you can find the released APK or IPA files form
build/app/outputs/flutter-apk/app-release.apk
其他推荐答案
For apk (Android) run the command :
flutter build apk --release
For ipa (iOS) run the command :
flutter build ios --release
Then to get actual .ipa file, open xcode -> Product -> archive -> Distribute App -> Ad Hoc -> Export
You can then save the .ipa(which is inside the Runner folder) file in any location