How can I get .apk and .ipa file from flutter?

限于喜欢 提交于 2019-12-03 07:15:33

问题


I am new to flutter programming and I've created a demo app, its running fine on both android and iOS device. 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.


回答1:


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.




回答2:


For apk (Android) you need to run the command :

flutter build apk --release

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




回答3:


For iOS:

Step 1: open terminal and type cd "your flutter sdk path"

Step 2: cd export PATH=/Users/yourname/Downloads/flutter/bin:$PATH

Step 3: cd your project path

Step 4: flutter build ios --release

run step 1 to 4 in terminal.

After that open android studio and go to iOS folder path and open project.pbxproj file with ios module and in xcode you need to choose generic ios device and select archive, it will generate ipa build for you.




回答4:


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.




回答5:


Updated for iOS :-

first you need to go to your current working directory and run the following command;

flutter build ios --release

After successfully completion of build, you can find build on below path;

/Users/sanjaybalaji/Documents/KiranFlutterApps/hb_calculator/build/ios/iphoneos/Runn
er.app.

you can check below screenshots for more details.



来源:https://stackoverflow.com/questions/50645703/how-can-i-get-apk-and-ipa-file-from-flutter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!