【发布时间】:2016-05-06 07:08:36
【问题描述】:
我尝试将任何背景放入我的 android 程序中,如下所示:
<?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:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/mypic"
tools:context="com.mm.openreg.MainActivity">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:id="@+id/S1"
android:layout_height="60dp"
android:layout_alignParentTop="true"
android:layout_marginTop="15dp"
android:layout_centerHorizontal="true">
我得到了这个错误:
AAPT 错误(972607565 的外观):D:\MyAndroid_Prog\MyAndroidProgram\OpenReg\app\src\main\res\drawable\savea.png:libpng 警告:iCCP:无法识别已编辑的已知 sRGB 配置文件 AAPT 错误(1945943478 的外观):libpng 错误:不是 PNG 文件
错误:任务“:app:mergeDebugResources”执行失败。 部分文件处理失败,查看日志了解详情
我尝试了所有方法,但运行程序时仍然出现同样的错误。
有人可以帮忙吗?
- 我也尝试了 png 文件和小文件 - 但相同
这是我的毕业典礼
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.mm.openreg"
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
【问题讨论】:
标签: android xml android-studio gradle