Import project from eclipse to android studio getting error -


i new android studio, import project in android studio run in eclipse. few of error resolved not solved yet.

here error -

error:execution failed task ':app:transformresourceswithmergejavaresfordebug'. com.android.build.api.transform.transformexception: com.android.builder.packaging.duplicatefileexception: duplicate files copied in apk meta-inf/license.txt file1: /home/user86/downloads/iah/app/libs/httpmime-4.2.3.jar file2: /home/user86/downloads/iah/app/libs/httpclient-4.2.3.jar file3: /home/user86/downloads/iah/app/libs/httpcore-4.2.2.jar

and here build.gradle file code.

apply plugin: 'com.android.application'  android { compilesdkversion 23 buildtoolsversion "23.0.2"  defaultconfig {     applicationid "com.packagename"     minsdkversion 14     targetsdkversion 23 }  buildtypes {     release {         minifyenabled true         proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-project.txt'     } }}   dependencies { compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:support-v4:23.1.1' compile 'com.google.android.gms:play-services:+' compile files('libs/parse-1.4.0.jar') compile files('libs/httpclient-4.2.3.jar') compile files('libs/httpcore-4.2.2.jar') compile files('libs/httpmime-4.2.3.jar') compile files('libs/picasso-2.5.2.jar') compile files('libs/volley.jar') } 

help resolve it. in advance.

updated gradle file

apply plugin: 'com.android.application'   dependencies { compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:support-v4:23.1.1' compile 'com.google.android.gms:play-services:+' compile files('libs/parse-1.4.0.jar') compile files('libs/httpclient-4.2.3.jar') compile files('libs/httpcore-4.2.2.jar') compile files('libs/httpmime-4.2.3.jar') compile files('libs/picasso-2.5.2.jar') compile files('libs/volley.jar')}    android { compilesdkversion 23 buildtoolsversion "23.0.2"  defaultconfig {     applicationid "com.instantassignmenthelp"     minsdkversion 14     targetsdkversion 23 }  buildtypes {     release {         minifyenabled true         proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-project.txt'     } }}   packagingoptions { exclude 'meta-inf/dependencies.txt' exclude 'meta-inf/license.txt' exclude 'meta-inf/notice.txt' exclude 'meta-inf/notice' exclude 'meta-inf/license' exclude 'meta-inf/dependencies' exclude 'meta-inf/notice.txt' exclude 'meta-inf/license.txt' exclude 'meta-inf/dependencies.txt' exclude 'meta-inf/lgpl2.1'} 

the packageoptions should come inside android tag.

android {     compilesdkversion 23     buildtoolsversion "23.0.2"  defaultconfig {     applicationid "com.instantassignmenthelp"     minsdkversion 14     targetsdkversion 23 }  buildtypes {     release {         minifyenabled true         proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-project.txt'     } }      packagingoptions {     exclude 'meta-inf/dependencies.txt'     exclude 'meta-inf/license.txt'     exclude 'meta-inf/notice.txt'     exclude 'meta-inf/notice'     exclude 'meta-inf/license'     exclude 'meta-inf/dependencies'     exclude 'meta-inf/notice.txt'     exclude 'meta-inf/license.txt'     exclude 'meta-inf/dependencies.txt'     exclude 'meta-inf/lgpl2.1'     } } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -