How to get .apk and .ipa file from flutter?

后端 未结 11 1060
自闭症患者
自闭症患者 2020-12-12 18:51

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

相关标签:
11条回答
  • 2020-12-12 19:32

    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.

    0 讨论(0)
  • 2020-12-12 19:38

    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.

    0 讨论(0)
  • 2020-12-12 19:42

    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.

    0 讨论(0)
  • 2020-12-12 19:43

    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

    0 讨论(0)
  • 2020-12-12 19:46

    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-abc
    

    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

    0 讨论(0)
提交回复
热议问题