2017-11-22 16 views
0

Android Studio 3.0でRealmを使用していますが、アプリケーションの起動時にこの問題が発生します。それは私のアプリケーションレベルのGradleはOS独立パス 'lib/arm64-v8a/librealm-jni.so'で複数のファイルが見つかりました

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' 
} 
を提出している私は android { }

packagingOptions { 
    pickFirst 'lib/x86/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'

以下のエラーが表示されます

トップレベルのGradleは、あなたがあなたのアプリレベルのgradelファイルからcompile 'io.realm:realm-android:0.84.0'を削除する必要が

// 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 
} 

答えて

1

ファイル。

+0

あなたは素晴らしい人です! –

関連する問題