我想知道如何改变在Android工作室的启动器图标。
当前回答
以下是我认为更适合Android Studio开发者的另一个解决方案:
Expand the project root folder in the Project View Right Click on the app folder In the Context Menu go to New->Image Asset In the pop up that appears select the the new logo you would like to have(image/clip art/text). If you were selecting the image radio button (as is the default choice), if you clicked on the 3-buttons to show the path tree to locate your .png image file, most probably you might not be seeing it, so drag it from the Windows Explorer (if Windows) and drop it in the tree, and it will appear and ready for being selected.
就是这样!你有一个新的标志为您的应用程序现在。
其他回答
在清单文件中,在标签下面,会有类似的一行:
android:icon="drawable_resource_path"
将启动器图标放置在可绘制文件夹中,并写入其资源路径。
打开AndroidManifest.xml,将android:icon="@mipmap/ic_launcher"修改为android:icon="@mipmap/(你的图像名)" 假设你有一个名为telugu的图像,你想把它设置为你的应用程序图标,然后改变android:icon="@mipmap/telugu",你必须复制并粘贴你的图像到mipmap文件夹,这就像我说的那样简单
至:
Res >可绘制>右击>显示在文件夹>添加所需的标志
然后进入android manifest,在application标签下编辑ICON标签,使用@drawable/nameOfImage
在应用程序的AndroidManifest.xml文件中查找<application>标记。
这个应用程序标签有一个android:icon属性,通常是@drawable/ic_launcher。 这里的值是启动器图标文件的名称。如果值为@drawable/ic_launcher,则图标的名称为ic_launcher.png。
在你的资源文件夹(res/ mimmap -mdpi, res/ mimmap -hdpi等)中找到这个图标并替换它。
关于mipmap资源的注意事项:如果你的启动器图标目前在可绘制文件夹中,例如res/drawable-hdpi,你应该将它们移动到mipmap的等效文件夹中(例如res/mipmap-hdpi)。Android将更好地保留mipmap文件夹中绘图的分辨率,以便在启动程序中显示。
Android Studio注意:如果你正在使用Android Studio,你可以让工作室在正确的位置为你放置绘图。只需右键单击您的应用程序模块,并单击新建->图像资产。
对于图标类型,对于平面PNG文件选择“启动器图标(仅Legacy)”,如果您还想为API 26+设备生成自适应图标,则选择“启动器图标(自适应和Legacy)”。
以下是我认为更适合Android Studio开发者的另一个解决方案:
Expand the project root folder in the Project View Right Click on the app folder In the Context Menu go to New->Image Asset In the pop up that appears select the the new logo you would like to have(image/clip art/text). If you were selecting the image radio button (as is the default choice), if you clicked on the 3-buttons to show the path tree to locate your .png image file, most probably you might not be seeing it, so drag it from the Windows Explorer (if Windows) and drop it in the tree, and it will appear and ready for being selected.
就是这样!你有一个新的标志为您的应用程序现在。
推荐文章
- 警告:API ' variable . getjavacompile()'已过时,已被' variable . getjavacompileprovider()'取代
- 安装APK时出现错误
- 碎片中的onCreateOptionsMenu
- TextView粗体通过XML文件?
- 如何使线性布局的孩子之间的空间?
- DSL元素android.dataBinding。enabled'已过时,已被'android.buildFeatures.dataBinding'取代
- ConstraintLayout:以编程方式更改约束
- PANIC: AVD系统路径损坏。检查ANDROID_SDK_ROOT值
- 如何生成字符串类型的buildConfigField
- Recyclerview不调用onCreateViewHolder
- Android API 21工具栏填充
- Android L中不支持操作栏导航模式
- 如何在TextView中添加一个子弹符号?
- PreferenceManager getDefaultSharedPreferences在Android Q中已弃用
- 在Android Studio中创建aar文件