简体   繁体   English

Android DJI SDK - 我从 Play 商店安装的 App Bundle 挂起一个完美运行的应用程序

[英]Android DJI SDK - My App Bundle installed from Play Store hangs an otherwise perfectly working app

So I've been dealing with this problem for years - if I build my DJI-compatible app as an APK, and submit it to the Play Store, it works fine.所以我多年来一直在处理这个问题 - 如果我将我的 DJI 兼容应用程序构建为 APK,并将其提交到 Play 商店,它工作正常。 If I build the same app as an App Bundle, and submit it to the Play Store, then when I install and run that app, the whole thing hangs / crashes.如果我构建与 App Bundle 相同的应用程序,并将其提交到 Play 商店,那么当我安装并运行该应用程序时,整个事情都会挂起/崩溃。

It's been possible using bundletool to replicate this issue with local builds, so I don't have to use the Play Store as a debugging platform (!!), but until now I've not been able to actually solve the problem.可以使用bundletool在本地构建中复制这个问题,所以我不必使用 Play 商店作为调试平台 (!!),但直到现在我还没有真正解决这个问题。 The hang seems to occur after calling DJISDKManager::registerApp() .挂起似乎发生在调用DJISDKManager::registerApp()

I got around this by releasing split APKs instead.我通过发布拆分 APK 来解决这个问题。 But now two things have made this more urgent for me:但现在有两件事让我觉得这更紧迫:

  1. Google are getting tighter and tigher on their requirements for using App Bundles (at least for new apps) Google 对使用 App Bundle 的要求越来越严格(至少对于新应用)
  2. With the latest DJI SDK (4.15 at time of writing) my app APKs are now above the 100MB limit使用最新的 DJI SDK(撰写本文时为 4.15),我的应用 APK 现在已超过 100MB 的限制

So it's gotta be App Bundles.所以它必须是 App Bundles。 What's missing to make these functional?使这些功能缺少什么?

I'm answering myself since this solution seems to have been helpful while buried in the DJI Mobile SDK Github Issues pages, maybe it's helpful here too.我在回答自己,因为这个解决方案似乎在埋在 DJI Mobile SDK Github 问题页面时很有帮助,也许在这里也有帮助。

By adding the line通过添加行

android.bundle.enableUncompressedNativeLibs=false

to gradle.properties , app bundle packaging seems to work fine now.gradle.properties ,应用程序包打包现在似乎工作正常。

References: Issue 982 , Issue 642参考文献:第 982 期第 642 期


Note in Issue 642, people have also added注意在第 642 期,人们还添加了

android:extractNativeLibs="true"

to their AndroidManifest.xml - this may be helpful;到他们的AndroidManifest.xml - 这可能会有所帮助; in my case this was already in place in my code to fix a different issue, so I couldn't say if it's required or not for this problem.在我的情况下,这已经在我的代码中解决了一个不同的问题,所以我不能说这个问题是否需要。

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

相关问题 从Play商店安装应用程序时,Android BroadcastReceiver无法正常工作 - Android BroadcastReceiver not working when app is installed from play store 修改compileSdkVersion后,我的Play商店中的应用挂起 - My app from the Play Store hangs after modifying compileSdkVersion Android Marshmallow APP Play Store 挂起 - Android marshmallow APP Play Store hangs Android:安装APK后从Play商店重定向到Android应用 - Android: Redirect to android app from play store when apk is installed 如果未安装应用程序,如何检查是否已从我的应用程序安装了应用程序? - how to check whether an app is installed from my app if the app is not installed go to play store? 从Play商店安装后,为什么我的android应用在启动时崩溃? - Why is my android app crashing on startup after being installed from play store? Azure DevOps 管道来构建和部署我的原生 Android 应用程序 Google Play 商店或 App Center 作为 App Bundle - Azure devops pipeline to build and deploy my native Android application Google Play store or App Center as App Bundle 检测是否从 Play 商店安装了应用程序 - Detect if an app is installed from Play store 从 Play 商店更新手动安装的应用 - Update manually installed app from Play Store 由于Google Play服务8.3.0,无法从Play商店安装Android应用 - Android app can not be installed from the play store because of Google Play Services 8.3.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM