简体   繁体   English

无法将现有的 Android apk 更新为 Flutter apk

[英]Unable to update existing Android apk to Flutter apk

I am unable to update my existing app in Android.我无法在 Android 中更新我现有的应用程序。

Previously, I have uploaded an app to play store that I developed using native Android(Java).以前,我已经上传了一个应用程序到我使用原生 Android(Java)开发的 Play 商店。 Right now I am migrating it to Flutter.现在我正在将它迁移到 Flutter。 As I wanna test before publishing the apk, I did a local APK install to update my existing app on the phone but i received error "App not installed".因为我想在发布 apk 之前进行测试,所以我安装了本地 APK 以更新手机上的现有应用程序,但我收到错误“未安装应用程序”。

When i deleted the existing app and made a fresh install everything works fine, APK installed successfully.当我删除现有应用程序并进行全新安装时,一切正常,APK 安装成功。

I followed the steps provided by Google here:我按照谷歌在这里提供的步骤进行操作:

https://flutter.dev/docs/deployment/android https://flutter.dev/docs/deployment/android

These are the steps I did:这些是我所做的步骤:

1) Generated the keystore file 1) 生成密钥库文件

2) Added settings configuration in build.gradle and key.properties file 2) 在build.gradle和key.properties文件中增加设置配置

3) Ensure my application ID is the same (which it is because it prompts me update when installing apk) 3)确保我的应用程序ID相同(这是因为它在安装apk时提示我更新)

4) run flutter build apk --release command 4) 运行 flutter build apk --release 命令

If you can't update the App on Play Store, I think the problem is on the first step that you have to use the same keystore file to update your app.如果您无法在 Play Store 上更新应用程序,我认为问题出在第一步,您必须使用相同的密钥库文件来更新您的应用程序。 Generating new keystore file is not acceptable even if application ID is the same.即使应用程序 ID 相同,也不能生成新的密钥库文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM