ZieIony / Carbon

Material Design implementation for Android 4.0+. Shadows, ripples, vectors, fonts, animations, widgets, rounded corners and more.
https://androidreclib.wordpress.com/
Apache License 2.0
3.05k stars 377 forks source link

Build Error #374

Closed itsaligadimi closed 5 years ago

itsaligadimi commented 5 years ago

Hi, I added carbon to dependecies and went through the other steps that was mentioned in the installation page. but when i tried to build the app i got this error: More than one file was found with OS independent path 'lib/arm64-v8a/libRSSupport.so'

then i tried this which i found in a StackOverflow question:

    packagingOptions{
        exclude 'lib/arm64-v8a/libRSSupport.so'
        exclude 'lib/arm64-v8a/librsjni.so'
        exclude 'lib/armeabi-v7a/libRSSupport.so'
        exclude 'lib/armeabi-v7a/librsjni.so'
        exclude 'lib/x86_64/libRSSupport.so'
        exclude 'lib/x86_64/librsjni.so'
        exclude 'lib/x86/libRSSupport.so'
        exclude 'lib/x86/librsjni.so'
    }

and got this error while installing: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

ZieIony commented 5 years ago

Are you using any other libraries that use RenderScript? Carbon automatically includes needed RenderScript files and there may be a conflict. Could you please share your build.gradle file? I would like to try to reproduce your issue.

itsaligadimi commented 5 years ago

This is my gradle file:

dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.android.support:design:28.0.0' //custom views implementation 'de.hdodenhof:circleimageview:2.2.0' implementation 'com.yqritc:recyclerview-flexibledivider:1.4.0' implementation 'com.skyline.widget:round-corner-layout:1.0.1' implementation 'me.imid.swipebacklayout.lib:library:1.1.0' implementation 'jp.wasabeef:blurry:2.1.1' implementation 'com.mikhaellopez:circularprogressbar:2.0.0' api 'tk.zielony:carbon:0.15.3'

//lottie
implementation 'com.airbnb.android:lottie:2.6.1'

//glide
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'jp.wasabeef:glide-transformations:3.3.0'

//testing
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//butterknife
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//timber
implementation 'com.jakewharton.timber:timber:4.7.1'

//networking implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.1.0' implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0' implementation 'com.squareup.okhttp3:okhttp:3.12.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'

//room database
implementation 'android.arch.persistence.room:runtime:1.1.1'
implementation 'android.arch.persistence.room:rxjava2:1.1.1'
annotationProcessor 'android.arch.persistence.room:compiler:1.1.1'
debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'

//RxJava/RxAndroid
implementation 'io.reactivex.rxjava2:rxjava:2.1.16'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'

//dagger
annotationProcessor 'com.squareup:javapoet:1.9.0'
annotationProcessor 'com.google.dagger:dagger-compiler:2.2'
implementation 'com.google.dagger:dagger:2.2'
compileOnly 'javax.annotation:jsr250-api:1.0'

}

itsaligadimi commented 5 years ago

i think i found the problem. i had this implementation 'de.hdodenhof:circleimageview:2.2.0' circleimageview which i don't need anymore. i removed it but i still need to have those excludes

CodeK1988 commented 5 years ago

@AliGadimi Hi,i have same error. but i use packagingOptions{ exclude 'lib/arm64-v8a/libRSSupport.so' exclude 'lib/arm64-v8a/librsjni.so' exclude 'lib/armeabi-v7a/libRSSupport.so' exclude 'lib/armeabi-v7a/librsjni.so' exclude 'lib/x86_64/libRSSupport.so' exclude 'lib/x86_64/librsjni.so' exclude 'lib/x86/libRSSupport.so' exclude 'lib/x86/librsjni.so' } it is working! this is my gradle implementation 'de.hdodenhof:circleimageview:3.0.0' // renderscriptTargetApi 20 // renderscriptSupportModeEnabled true ndkConfig.abiFilters 'armeabi' // ndk { // abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'mips' // }

CodeK1988 commented 5 years ago

// renderscriptTargetApi 20 // renderscriptSupportModeEnabled true // ndk { // abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'mips' // } ndkConfig.abiFilters 'armeabi'

CodeK1988 commented 5 years ago

i donot kown the cause.maybe circleimageview version? i try add packagingOptions and remove circleimageview. clear and rebuild. and reset add circleimageview. now it working. however,thanks every one!!