2017-11-22 1 views
0

Ich benutze Realm mit Android Studio 3.0, und ich laufe auf dieses Problem, wenn ich beginne, die Anwendung zu starten. Es zeigt ein Fehler unterMehr als eine Datei wurde mit Betriebssystem unabhängigen Pfad gefunden 'lib/arm64-v8a/librealm-jni.so'

Error:Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'. More than one file was found with OS independent path 'lib/arm64-v8a/librealm-jni.so'

Ich habe versucht, das Hinzufügen

packagingOptions { 
    pickFirst 'lib/x86/librealm-jni.so' 
} 

zu android { }, aber es funktioniert immer noch nicht

Hier sind meine App Stufe Gradle

apply plugin: 'com.android.application' 
apply plugin: 'realm-android' 

android { 
    compileSdkVersion 26 
    buildToolsVersion '26.0.2' 
    defaultConfig { 
     minSdkVersion 19 
     targetSdkVersion 26 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
     javaCompileOptions { 
      annotationProcessorOptions { 
       includeCompileClasspath false 
      } 
     } 
    } 

    packagingOptions { 
     pickFirst 'lib/x86/librealm-jni.so' 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 

    // retrofit 
    compile 'com.android.support:appcompat-v7:26.1.0' 
    compile 'com.android.support:design:26.1.0' 
    compile 'com.android.support.constraint:constraint-layout:1.1.0-beta3' 
    compile 'com.android.support:support-v4:26.1.0' 
    compile 'com.google.code.gson:gson:2.8.2' 
    compile 'com.squareup.retrofit2:retrofit:2.3.0' 
    compile 'com.squareup.retrofit2:converter-gson:2.0.2' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.2' 
    compile 'me.leolin:ShortcutBadger:[email protected]' 
    compile 'io.realm:realm-android:0.84.0' 
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.2' 
    compile 'com.jakewharton:butterknife:8.7.0' 
    compile 'com.android.support:cardview-v7:26.1.0' 
    compile 'com.romandanylyk:pageindicatorview:0.2.0' 
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0' 

    testCompile 'junit:junit:4.12' 
} 
Datei

Mein Top Level Gradle Datei

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
     google() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.1' 
     classpath "io.realm:realm-gradle-plugin:3.3.2" 
     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 



} 

allprojects { 
    repositories { 
     jcenter() 
     maven { url "https://jitpack.io" } 
     google() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

Antwort

1

Sie benötigen compile 'io.realm:realm-android:0.84.0' von Ihnen App-Ebene Gradel Datei zu entfernen.

+0

Du bist ein toller Mann! –

Verwandte Themen