我是学习Flutter的Android开发人员,尝试创建调试.ipa文件来进行测试时确实遇到了一些麻烦。
因此,我设法使用Terminal的命令创建Runner.app文件:
flutter build ios --debug
Run Code Online (Sandbox Code Playgroud)
Runner.app文件的位置是
my_project_folder / build / ios / iphoneos / Runner.app
接下来做什么?另外,有没有一种方法可以从Xcode创建调试.ipa文件?谢谢。
添加后
位置:^1.4.1
到我在 pubspec.yaml 中的依赖项:
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
rxdart: ^0.20.0
http: ^0.12.0
date_format: ^1.0.5
intl: ^0.15.7
fluttertoast: ^2.2.3
location: ^1.4.1
Run Code Online (Sandbox Code Playgroud)
我做了 Packages get,一切都很好,但是当我尝试构建它时,应用程序崩溃并显示一条消息:
在调试模式下在 Lenovo K33a48 上启动 lib\main.dart... 初始化 gradle... 解决依赖项... Gradle 任务 'assembleDebug'... D8:程序类型已经存在:android.support.v4.app.INotificationSideChannel
FAILURE:构建失败,出现异常。
出了什么问题:任务 ':app:transformDexArchiveWithExternalLibsDexMergerForDebug' 执行失败。
com.android.builder.dexing.DexArchiveMergerException:合并 dex 档案时出错:“这是所有 jar 档案的列表” 在https://developer.android.com/studio/build/dependencies#duplicate_classes了解如何解决此问题. 程序类型已存在:android.support.v4.app.INotificationSideChannel
尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan …