gpt4 book ai didi

android - 即使所有包名称都相同,Flutter build apk 在启动时也会崩溃

转载 作者:行者123 更新时间:2023-12-04 15:35:59 24 4
gpt4 key购买 nike

有什么办法可以隔离这个问题吗?每次我尝试在任何设备上安装我的构建 apk 时,它都会崩溃,但在 Debug模式下它工作正常。我在运行 flutter build apk 时没有收到任何错误,除了在安装并打开它后立即崩溃。此外,该应用尚未签名,只是想使用生成的 apk 在不同的手机上对其进行测试

到目前为止我尝试了什么:

  1. Change all package names to same in AndroidManifest.xml in app/src and the folders with xmls there.
  2. Change package names to the one I've used in AndroidManifest in build.gradle
  3. Even changed the package name in google-services.json since I'm using Firebase

如果需要,这里是我的 pubspec.yaml

name: vmembershipofficial
description: V Membership App

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
sdk: ">=2.1.0 <3.0.0"

dependencies:
flutter:
sdk: flutter
firebase_core: ^0.4.3+1
cupertino_icons: ^0.1.2
firebase_analytics: ^5.0.9
firebase_auth: ^0.15.3+1
cloud_firestore: ^0.13.0+1
firebase_database: ^3.1.1
firebase_storage: ^3.1.1
image_picker: ^0.6.3
font_awesome_flutter: ^8.5.0
flutter_bloc: ^3.1.0
bloc_pattern: ^2.3.2
video_player: ^0.10.5+1

dev_dependencies:
flutter_test:
sdk: flutter


# The following section is specific to Flutter.
flutter:

assets:
- assets/images/

fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
- family: Lato
fonts:
- asset: assets/fonts/Lato-Black.ttf
- asset: assets/fonts/Lato-Blackitalic.ttf
- asset: assets/fonts/Lato-Bold.ttf
- asset: assets/fonts/Lato-Bolditalic.ttf
- asset: assets/fonts/Lato-italic.ttf
- asset: assets/fonts/Lato-Light.ttf
- asset: assets/fonts/Lato-Lightitalic.ttf
- asset: assets/fonts/Lato-Regular.ttf
- asset: assets/fonts/Lato-Thin.ttf
- asset: assets/fonts/Lato-Thinitalic.ttf

最佳答案

我修好了。我突然想到使用 flutter pub upgrade 并且它有效。我在 Stack 中看到了一个类似的问题,但它对我不起作用,我只会评论我对该问题的回答,以帮助其他人。

关于android - 即使所有包名称都相同,Flutter build apk 在启动时也会崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59726339/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com