Android Studio版本1.3有更新。更新后,我打开了我的项目,当我尝试在模拟器中运行它时,出现错误。
Information:Gradle tasks [clean, :app:compileDebugSources, :app:compileDebugAndroidTestSources]
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72221Library
:app:prepareComAndroidSupportRecyclerviewV72221Library
:app:prepareComAndroidSupportSupportV42221Library
:app:prepareComGithubSatyanSugar131Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
AAPT err(1035023611): C:\Users\Jeems\Documents\JoelMobile2\app\src\main\res\drawable-hdpi\ic_drawer.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT err(906211783): C:\Users\Jeems\Documents\JoelMobile2\app\src\main\res\drawable-xxhdpi\ic_launcher.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT err(672280396): C:\Users\Jeems\Documents\JoelMobile2\app\src\main\res\drawable-xhdpi\ic_drawer.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT err(604063224): C:\Users\Jeems\Documents\JoelMobile2\app\src\main\res\drawable-mdpi\ic_drawer.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
:app:processDebugManifest
:app:processDebugResources
C:\Users\Jeems\Documents\JoelMobile2\app\build\intermediates\res\debug\drawable-xxhdpi-v4\ic_launcher.png: error: Duplicate file.
C:\Users\Jeems\Documents\JoelMobile2\app\build\intermediates\res\debug\drawable-xxhdpi\ic_launcher.png: Original is here. The version qualifier may be implied.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Jeems\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
有没有解决方案可以解决这个问题?
答案 0 :(得分:2)
构建>清洁项目然后Gradle
& Restart
项目。
答案 1 :(得分:1)
您有一个重复的文件。错误显示在构建日志
中drawable-xxhdpi-v4\ic_launcher.png: error: Duplicate file.
drawable-xxhdpi\ic_launcher.png: Original is here. The version qualifier may be implied.
删除其中一个。