Android Studio Run appears error:execution failed for task ': App:transformresourceswithmergejavaresfordebug '.

Source: Internet
Author: User

Reprint please indicate the source:
Http://www.cnblogs.com/why168888/p/5978381.html

This article is from:"Edwin Blog Garden"


I quoted compile ' com.squareup.retrofit2:converter-jackson:2.1.0 ' gradle without errors, running the app on this error.

error log :error:execution failed for task ': App:transformresourceswithmergejavaresfordebug '. > Com.android.build.api.transform.TransformException: Com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK Meta-inf/license


Here's how to fix it:

Android {compilesdkversion -buildtoolsversion"24.0.3"Defaultconfig {ApplicationID"com.edwin.xxxx"minsdkversion +targetsdkversion -Versioncode1Versionname"1.0"Testinstrumentationrunner"Android.support.test.runner.AndroidJUnitRunner"} buildtypes {release {minifyenabledfalseproguardfiles Getdefaultproguardfile ('Proguard-android.txt'),'Proguard-rules.pro'        }    }packagingoptions{Exclude'Meta-inf/notice' //Would not include NOTICE fileExclude'Meta-inf/license' //Would not include LICENSE file//As noted by @Vishnuvathsan the also need to include//Variations on the file name.        It depends on your dependencies. //Some Other common variations on notice and license file namesExclude'Meta-inf/notice'Exclude'Meta-inf/notice.txt'Exclude'Meta-inf/license'Exclude'Meta-inf/license.txt'    }}

Android Studio Run appears error:execution failed for task ': App:transformresourceswithmergejavaresfordebug '.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.