Flutter 真機(jī)運(yùn)行和打包遇到的問題

  • 如下圖真機(jī)運(yùn)行的時(shí)候報(bào)6S has denied the launch request. Internal launch error: process launch failed: failed to get the task for process 36000的錯(cuò)誤,

    image.png

    這個(gè)錯(cuò)誤在于真機(jī)運(yùn)行的時(shí)候使用的描述文件是distribute的,將描述文件改為debug的就好了

  • AS 跑真機(jī)的時(shí)候報(bào) error: Building for iOS, but the embedded framework 'App.framework' was built for iOS Simulator. (in target 'Runner' from project 'Runner')
    這個(gè)時(shí)候只需要我們找到Flutter 生成的 App.framework下的App,將App刪掉重新編譯就好

    image.png

  • archive的時(shí)候報(bào)
    Bitcode bundle could not be generated because '/***/.ios/Flutter/engine/Flutter.framework/Flutter' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/***/.ios/Flutter/engine/Flutter.framework/Flutter' for architecture armv7
    情形一:有時(shí)候時(shí)候我們需要將FlutterModule中的.ios工程中的Bitcode關(guān)掉就好了
    情形二:本情況適用于在情形一無效的情況下
    1、AS 終端執(zhí)行flutter clean
    2、終端 Flutter build ios --release
    3、修改bundleid 和 證書及描述文件
    4、然后對(duì).ios工程執(zhí)行pod install,然后bitcode修改為no,然后archive
    5、.ios的工程archive沒問題的話,再對(duì)native 項(xiàng)目執(zhí)行pod install,bitcode修改為no,然后archive
    參考github上的解決

    image.png

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容