se-bastiaan / TorrentStream-Android

A torrent streamer library for Android based on libtorrent4j
Other
343 stars 108 forks source link

This project is not work from classpath 'com.android.tools.build:gradle:2.3.0' #31

Closed AppNetDeveloper closed 7 years ago

AppNetDeveloper commented 7 years ago

Hi all

I am intented actualized this library and now is not work . This lib is not work with classpath 'com.android.tools.build:gradle:2.3.0' , if change google service 2.3 with 2.2.2 is work fine , but from the new version 2.3.0 is not word, But the library version compile "com.github.se-bastiaan:TorrentStream-Android:2.2.1" is work fine with classpath 'ccom.android.tools.build:gradle:2.3.0 This is the error:

Error:Execution failed for task ':sample:transformNativeLibsWithMergeJniLibsForDebug'. com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK lib/armeabi-v7a/libjlibtorrent.so File1: /root/.gradle/caches/modules-2/files-2.1/com.frostwire/jlibtorrent-android-arm/1.2.0.4/2af7ed9a91be687d03377093ddd0e108e4eda699/jlibtorrent-android-arm-1.2.0.4.jar File2: /home/liviu/Downloads/1/TorrentStream-Android-develop/library/build/intermediates/bundles/default/jni

se-bastiaan commented 7 years ago

How does your gradle file look like?

dudego commented 7 years ago

add following to sample build.gradle

android {
////
packagingOptions {
        merge 'lib/armeabi-v7a/libjlibtorrent.so'
        merge 'lib/arm64-v8a/libjlibtorrent.so'
        merge 'lib/x86/libjlibtorrent.so'
        merge 'lib/x86_64/libjlibtorrent.so'
    }
}