错误信息如下:
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72100Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72100Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42100Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:preDexDebug UP-TO-DATE
:app:dexDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:validateDebugSigning
:app:packageDebug
Error:duplicate files during packaging of APK F:\android_studio_project\nizaoma\app\build\outputs\apk\app-debug-unaligned.apk
Path in archive: META-INF/NOTICE.txt
Origin 1: F:\android_studio_project\nizaoma\app\libs\httpmime-4.2.4.jar
Origin 2: F:\android_studio_project\nizaoma\app\libs\fastjson.jar
You can ignore those files in your build.gradle:
android {
packagingOptions {
exclude 'META-INF/NOTICE.txt'
}
}
Error:Execution failed for task ':app:packageDebug'.
> Duplicate files copied in APK META-INF/NOTICE.txt
File 1: F:\android_studio_project\nizaoma\app\libs\httpmime-4.2.4.jar
File 2: F:\android_studio_project\nizaoma\app\libs\httpmime-4.2.4.jar
第二次使用leancloud,第一次在eclipce上,完全没问题。
这次在android studio上,使用和上一次同样的jar包,同样的方法调用,报以上错误。
求解。谢谢。