基本清单缺少android:icon您需要使用其他软件包名称,因为“ com.example”受到限制 问题1:您的基本清单缺少android:icon属性问题2:由于“ com.example”受到限制,您需要使用其他软件包名称

问题描述

我要在Play商店上发布我的android应用程序项目。因此,在阅读了一些博客之后,我决定将该应用程序测试给某些受限用户,然后发布该应用程序。但是,当我在Play商店中上传应用程序的软件包时,红线错误就会出现:

Your base manifest is missing android:icon. nullLearn more about android:iconnull. 
You need to use a different package name because "com.example" is restricted.

See the error here

为什么弹出此错误,我已经完成了设置图标的操作。这行"com.example" is restricted.的含义是什么。

解决方法

问题1:您的基本清单缺少android:icon属性

打开应用的清单文件,转到<application>标签。在<application>标记内,您需要使用android:icon属性设置应用程序的图标。请参阅以下代码以供参考:

<application
    android:allowBackup="true"
    android:icon="@drawable/app_icon"
    android:label="@string/app_name"
    android:networkSecurityConfig="@xml/network_security_config"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"/> 

问题2:由于“ com.example”受到限制,您需要使用其他软件包名称

程序包名称是您的应用程序的唯一标识符。 “ com.example”是Android应用程序的默认程序包名称,因此您需要更改应用程序程序包名称。按照此tutorial更改应用程序包名称。

,

您无法使用com.example软件包名称将apk上传到Play商店。您的包裹名称本质上应该是唯一的,您需要更改包裹名称

Change package name

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...