###前提・実現したいこと
android studioにrealmをインストールしたいのですが、エラーメッセージが発生しました。
###発生している問題・エラーメッセージ
エラーメッセージ Error:Conflict with dependency 'com.google.code.findbugs:jsr305' in project ':app'. Resolved versions for app (3.0.2) and test app (2.0.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
###該当のソースコード
build.grade(app)
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
build.grade
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "io.realm:realm-gradle-plugin:3.7.2"
}
###試したこと build.grade(app)に、apply plugin: 'realm-android'を追加し、 apply plugin: 'realm-android'に、classpath "io.realm:realm-gradle-plugin:3.7.2"を追加し、Syncしました。 ###補足情報(言語/FW/ツール等のバージョンなど) より詳細な情報 apply plugin: 'com.android.application' apply plugin: 'realm-android' android { compileSdkVersion 26 buildToolsVersion "26.0.2" defaultConfig { applicationId "fit.todolist" minSdkVersion 15 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } 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' }) compile 'com.android.support:appcompat-v7:26.+' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support:design:26.+' testCompile 'junit:junit:4.12' } // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath "io.realm:realm-gradle-plugin:3.7.2" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
回答1件
あなたの回答
tips
プレビュー