【发布时间】:2016-11-22 01:12:56
【问题描述】:
只有png图片可以转换成9个补丁?
如果我做错了什么,请纠正我。我通过paint将jpg图像转换为png。 然后将扩展名更改为 .9.png 以便它可以通过 android studio 转换为 9patch 图像。我通过android studio将该图像转换为9个补丁。但是当我清理并构建它时会出错
错误:任务 ':app:mergeDebugResources' 执行失败。 部分文件处理失败,详情请查看日志
请帮忙
下面是我的xml:-
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="myresolver.faisal.home.com.myresolver.MainActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:src="@drawable/fear_72"/>
</RelativeLayout>
【问题讨论】:
-
尝试从android studio中的文件名中删除
.9。
标签: android png nine-patch