https://kotlinlang.org logo
Title
t

Thiago

12/19/2017, 3:55 PM
@bachhuberdesign project ou module?
b

bachhuberdesign

12/19/2017, 3:55 PM
Module
Here's what I use :
android {
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/rxjava.properties'
    }
}
t

Thiago

12/19/2017, 3:57 PM
Error:(43, 0) Could not find method packagingOptions() for arguments [build_dfh3g8jxkzn7t1qi0cjy0m4jf$_run_closure3@4242e8a9] on project
b

bachhuberdesign

12/19/2017, 3:57 PM
Paste your build.gradle, sounds like a syntax issue
t

Thiago

12/19/2017, 4:02 PM
apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'com.getkeepsafe.dexcount' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 26 defaultConfig { minSdkVersion 21 targetSdkVersion 26 versionCode 1 versionName "1.0" flavorDimensions "default" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } productFlavors { prod { } staging { } } } repositories { mavenCentral() maven { url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo' } } packagingOptions { exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' exclude 'META-INF/rxjava.properties' } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test🏃1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" kapt "com.google.dagger:dagger-compiler:$daggerVersion" provided 'org.glassfish:javax.annotation:10.0-b28' compile "com.google.dagger🗡$daggerVersion" annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion" compile "io.reactivex:rxandroid:$rxAndroidVersion" compile "io.reactivex:rxkotlin:$rxKotlinVersion" compile "com.squareup.retrofit2:retrofit:$retrofitVersion" compile "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion" compile "com.squareup.retrofit2:converter-gson:$retrofitVersion" compile "com.squareup.okhttp3:logging-interceptor:$okHttpVersion" kapt "com.github.Raizlabs.DBFlow:dbflow-processor:$dbFlowVersion" compile "com.github.Raizlabs.DBFlow:dbflow-core:$dbFlowVersion" compile "com.github.Raizlabs.DBFlow:dbflow:$dbFlowVersion" compile "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:$dbFlowVersion@aar" compile "com.github.Raizlabs.DBFlow:dbflow-rx:$dbFlowVersion" compile "com.github.Raizlabs.DBFlow:dbflow-rx-kotlinextensions:$dbFlowVersion" // RXJava 2 support compile "com.github.Raizlabs.DBFlow:dbflow-rx2:$dbFlowVersion" // RXJava 2 Kotlin Extensions Support compile "com.github.Raizlabs.DBFlow:dbflow-rx2-kotlinextensions:$dbFlowVersion" }
b

bachhuberdesign

12/19/2017, 4:04 PM
packagingOptions needs to go under android { }
t

Thiago

12/19/2017, 4:16 PM
This solution did not solve the problem.
🙁