简体   繁体   English

Unity Google Play控制台警告优化APK

[英]Unity Google Play Console Warning optimize APK

I uploaded a Unity game to Google Play Console. 我将Unity游戏上传到Google Play控制台。 But I got this warning: 但是我得到了这个警告:

APK without optimization Warning: 没有优化的APK警告:

This APK has codes and resources that are not used and that are being sent to users. 该APK包含未使用且正在发送给用户的代码和资源。 Reduce the size of your application with the Android App Bundle. 使用Android应用程序捆绑包减小应用程序的大小。 If you do not optimize your application for different device configurations, it will weigh too much to download and install it on users' devices. 如果您没有针对不同的设备配置优化应用程序,则它的负担太大,无法将其下载并安装到用户的设备上。 The heavier applications have a lower volume of downloads. 较重的应用程序下载量较小。 In addition, they take up a lot of storage space on users' devices. 另外,它们占用了用户设备上的大量存储空间。

Solution: Use the Android App Bundle to be automatically optimized according to different device configurations or manage it with several APKs. 解决方案:使用Android App Bundle可以根据不同的设备配置自动进行优化,或者通过多个APK对其进行管理。

Why it can be? 为什么会这样呢? In my Unity project, I have the scenes with all necessary and in Asset, I have the resources, prefabs, scripts... 在我的Unity项目中,我拥有所有必要的场景,在Asset中,我拥有资源,预制件,脚本...

I have some resources which do not use in any scene yet, it can be the problem? 我有一些不在任何场景中使用的资源,这可能是问题吗? And if it is, how I could fix it? 如果是的话,我该如何解决? I do not wanna delete resources from the project which I will use shortly... 我不想从我不久将要使用的项目中删除资源...

The Play Console has detected that your APK includes native libraries for multiple device architectures. Play控制台检测到您的APK包含适用于多种设备架构的本机库。 This means that regardless of the architecture of the device of your users, they will receive the libraries for all of them. 这意味着,无论用户设备的体系结构如何,他们都会收到所有用户的库。

This is just a warning to let you know that your app is unnecessarily big and could be reduced in size by publishing an App Bundle instead of an APK (Play would then generate the APKs for you, but only serves the libraries that each device needs). 这只是一个警告,旨在通知您您的应用程序过大,可以通过发布应用程序捆绑包而不是APK来减小应用程序的大小(然后Play会为您生成APK,但仅提供每个设备所需的库) 。

@LiefLayer has shown you in the other answer how to do it from Unity. @LiefLayer在另一个答案中向您展示了如何从Unity进行操作。 Keep in mind however that you'll need to be enrolled in App Signing by Play before that. 但是请记住,在此之前,您需要先注册加入Play的App Signing。

You can find more information at http://g.co/androidappbundle 您可以在http://g.co/androidappbundle中找到更多信息

Hope that helps, 希望能有所帮助,

You uploaded an apk. 您上传了一个APK。 You can upload an Android App Bundle instead by using unity: 您可以使用unity来上传Android App Bundle:

在此处输入图片说明

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

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