[英]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:但现在有两件事让我觉得这更紧迫:
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.