彩色图像变成了没有颜色,只有一个灰色的矢量可绘制? [英] The colored image turned to have no color and just a grey vector in drawable?

查看:348
本文介绍了彩色图像变成了没有颜色,只有一个灰色的矢量可绘制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Drawable cus中创建了一个新的Image Assets我需要在我的应用程序中插入一个新图像,但每次创建一个新的图像资源时,输出都变成了没有颜色。我附上了它的图片。

I have created a new Image Assets in the Drawable cus I need to insert a new image in my app, but every time I create a new image asset, the output turns to be no colour at all. I've attached the pic of it.

令人困惑的是,无论何时我在布局中导入它,它都只是灰色的,你可以看到在图像中。为什么我找不到任何现成的解决方案?如果我被忽视,请告诉我。

It's confusing and whenever I import it in my layout, it's just grey all over as you can see in the image. Why is it cus I can't find any ready solutions? Let me know if I'm overlooked.

推荐答案

我得到了自己的问题的答案,我发现它对那些仍然不知道如何启用 批量可绘制导入 。它很简单,只需要下载插件并安装即可。我已经读过最新版本已经拥有它并且我已经下载并重新安装了,但它并没有显示出我的期望。解决方案是下载并安装它。

I got the answer for my own question which I find it's useful for some who still do not know how to enable the Batch Drawable Import. It's easy and just need to download plugin and install. I've read that the latest version already has it and I've downloaded and reinstalled, but it didn't show as what I was expecting. The solution is to download and install it.



  1. 首先,在Android Studio中,转到默认设置文件 - >设置或者您可以简单点击 SDK Manager图标

  1. First, In Android Studio, go to Default Setting File --> Setting or you can simple Click the SDK Manager Icon

在默认设置中,转到插件

In the Default Setting, go to Plugins

在搜索选项中,输入 Batch Drawable Import ,你会看到 Android Drawable Importer

In the search option, type Batch Drawable Import and you'll see there's Android Drawable Importer.

在我的图片中,它已经安装,点击安装插件,然后关注说明。

In my image, it's already installed, Click Install Plugin and just follow the instructions.

你必须重新启动Android Studio并尝试创建一个新的Batch Drawable Import,你会在那里找到它。 ;) 谢谢。

You'll have to restart Android Studio and try to create a new Batch Drawable Import and you'll find it there. ;) Thanks.


这篇关于彩色图像变成了没有颜色,只有一个灰色的矢量可绘制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆