我想知道如何改变在Android工作室的启动器图标。
当前回答
要更改应用程序图标,请转到您的res目录,右键单击mipmap文件夹,单击New > Image Asset。通过从菜单中单击图像资产,将打开一个资产工作室对话框,从源资产部分选择资产类型图像,从路径选择您想要的图像,然后单击下一步按钮,最后单击完成来更改图标。
其他回答
要在Android Studio中快速创建一组新的图标并更改启动器图标,您可以:
使用这个工具: https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html 上传您首选的图像或图标(源文件)。 然后,该工具自动为ic_launcher.png文件创建一组不同分辨率的图标。 下载由工具创建的zip文件,解压所有内容(这将为所有不同的分辨率创建一个文件夹结构),然后替换项目res文件夹中的所有图标: < AndroidStudioProjectPath > \ app \ src \ \ res
以下是我认为更适合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.
就是这样!你有一个新的标志为您的应用程序现在。
打开项目文件夹\app\src\main\res\ mimmap -mdpi\ic_launcher.png
您将看到5个mipmap文件夹。将每个mipmap文件夹中的图标替换为所需的图标。
以下是我完成这项任务的步骤:
创建大小为512x512像素的PNG图像文件 在Android Studio的项目视图中,突出显示一个mipmap目录 在菜单中,转到文件>新建>图像资产 在资产类型按钮行单击“图像按钮” 单击路径框右侧的3个点框。 拖动图像到源资产框 单击下一步(注意:现有的启动器文件将被覆盖) 单击Finish
进入AndroidManifest.xml 在标签中,寻找android:icon标签。 复制并粘贴您的图标在可绘制文件夹(可在项目的res文件夹)。 设置“android:icon tag”的值为 android:图标= " @drawable / youriconname”
瞧!你完成了。保存更改并进行测试。
推荐文章
- 警告: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文件