What do you want to achieve?
Upgrade RealmDatabase from version 1.1.0 -> 4.1.1
And exectute ./gradlew connectedCheck check for android unit test module
Successful execute ./gradlew connectedCheck for android test
Failed when execute: ./gradlew connectedCheck
com.company.android.ebook.content.realm.RealmContentCacheRepositoryInstTest$DeleteByContentIdTest > レコードがない場合は変化がないこと[SM-G610F - 7.0] FAILED
java.lang.AssertionError: something wrong io.realm.exceptions.RealmException: 'class com.company.android.ebook.bookshelf.realm.RealmThumbnail' is not part of the schema for this Realm.
at com.company.android.ebook.content.realm.RealmContentCacheRepositoryInstTest$DeleteByContentIdTest$レコードがない場合は変化がないこと$1$3.onFail(RealmContentCacheRepositoryInstTest.kt:243)
Tests on SM-G610F - 7.0 failed: Instrumentation run failed due to 'Process crashed.'
:ebook:connectedDebugAndroidTest FAILED
@VisibleForTesting
open class RealmThumbnail(
@PrimaryKey var url: String = "",
@Required var updatedAt: Date = Date(0)
) : RealmObject()
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jetbrains.dokka-android'
apply plugin: 'realm-android'
apply plugin: 'jacoco'
ext {
lib_versions = [
// main
okhttp: '3.3.1',
retrofit: '2.0.2',
jdeferred: '1.2.4',
// testing
junit: '4.12',
assertj_android: '1.1.1',
robolectric: '3.1',
android_support_test: '0.5',
jackson: '2.7.5',
mockito: '1.10.19',
mockito_kotlin: '0.5.1'
]
}
repositories {
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
// Instrumentation Test時のMultiDex対応
multiDexEnabled true
testInstrumentationRunner 'android.support.test.MultiDexAndroidJUnitRunner'
// ProGuardの設定をAARに同梱する(=使用側プロジェクトのProGuard-rulesとして採用させる)
consumerProguardFiles 'proguard-rules.pro'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
main.jniLibs.srcDirs += 'src/main/jniLibs'
// testとandroidTestで共通のコード(ヘルパー)
String commonTestKotlinDir = 'src/commonTest/kotlin'
test.java.srcDirs += commonTestKotlinDir
androidTest.java.srcDirs += commonTestKotlinDir
// モック用テキストデータをandroidTestとtestで共有
// (Robolectrics用の設定はここではなく、robolectric.propertiesにある)
String mockAssetsDir = "src/commonTest/assets"
test.assets.srcDir mockAssetsDir
androidTest.assets.srcDir mockAssetsDir
}
dexOptions {
javaMaxHeapSize "4g"
}
lintOptions {
lintConfig file('lint.xml')
abortOnError false
}
packagingOptions {
exclude "asm-license.txt"
// Workaround to avoid the Jackson Problem
// http://anton0825.hatenablog.com/entry/2015/01/16/154147
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
compile files('libs/acs-guava-14.0.1.jar')
compile 'com.android.support:appcompat-v7:25.0.1'
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// Realm
compile "io.realm:realm-android-library:$realm_version"
compile "io.realm:realm-annotations:$realm_version"
// API
compile "com.squareup.okhttp3:okhttp:$lib_versions.okhttp"
compile "com.squareup.okhttp3:okhttp-urlconnection:$lib_versions.okhttp"
compile "com.squareup.retrofit2:retrofit:$lib_versions.retrofit"
compile "com.squareup.retrofit2:converter-moshi:$lib_versions.retrofit"
compile "com.squareup.moshi:moshi-adapters:1.2.0"
compile "com.squareup.okhttp3:logging-interceptor:$lib_versions.okhttp"
// Future/Promise pattern
compile "org.jdeferred:jdeferred-android-aar:$lib_versions.jdeferred"
// java.io
compile 'com.squareup.okio:okio:1.9.0'
// HTML Parser
compile 'org.jsoup:jsoup:1.7.3'
compile 'org.unbescape:unbescape:1.0'
// test
testCompile "junit:junit:$lib_versions.junit"
testCompile "org.robolectric:robolectric:$lib_versions.robolectric"
testCompile "com.squareup.assertj:assertj-android:$lib_versions.assertj_android"
testCompile "com.squareup.okhttp3:mockwebserver:$lib_versions.okhttp"
testCompile "com.fasterxml.jackson.core:jackson-databind:$lib_versions.jackson"
testCompile "org.mockito:mockito-core:$lib_versions.mockito"
testCompile "com.nhaarman:mockito-kotlin:$lib_versions.mockito_kotlin"
// androidTest
androidTestCompile "junit:junit:$lib_versions.junit"
androidTestCompile "com.squareup.assertj:assertj-android:$lib_versions.assertj_android"
androidTestCompile "com.android.support.test:runner:$lib_versions.android_support_test"
androidTestCompile "com.android.support.test:rules:$lib_versions.android_support_test"
androidTestCompile 'com.android.support:multidex-instrumentation:1.0.1'
androidTestCompile "com.squareup.okhttp3:mockwebserver:$lib_versions.okhttp"
androidTestCompile "com.fasterxml.jackson.core:jackson-databind:$lib_versions.jackson"
}
task clearJar(type: Delete) {
delete 'build/libs/ebook.jar'
}
task makeJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('release/')
include('classes.jar')
rename('classes.jar', 'ebook.jar')
}
makeJar.dependsOn(clearJar, build)
dokka {
outputFormat = "javadoc"
outputDirectory = "$buildDir/javadoc"
linkMapping {
dir = "src/main/kotlin"
url = "https://github.com/cy6erGn0m/vertx3-lang-kotlin/blob/master/src/main/kotlin"
suffix = "#L"
}
sourceDirs = files('src/main/kotlin')
}
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':ebook:connectedDebugAndroidTest'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.api.GradleException: There were failing tests. See the report at: path.../build/reports/androidTests/connected/index.html
at com.android.build.gradle.internal.tasks.DeviceProviderInstrumentTestTask.runTests(DeviceProviderInstrumentTestTask.java:160)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 60 more
Realm version(s): 4.1.1 . I had to tried with versions: 3.7.2, 4.0.0, 4.1.0 most also meet the same error
Realm sync feature enabled: no
Android Studio version: 3.0.0
Which Android version and device: SamSung j7 prime os android 7.0
// Realm
compile "io.realm:realm-android-library:$realm_version"
compile "io.realm:realm-annotations:$realm_version"
This two lines need to be removed. The recent realm-java don't need this in the app's build.gradle anymore.
@beeender Thanks for quickly support. I have removed 2 lines you suggest but it still has the same error above
how does your project level build.gradle look like? Also, try to do a full clean before rebuild to test.
@beeender I also full clean before rebuild but it's not working, same error.
In my project has 2 module: app and ebook. build.gradle in module app look like this:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'realm-android'
apply plugin: 'io.fabric'
apply plugin: 'com.cookpad.android.licensetools'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url 'http://fan-adn.github.io/nendSDK-Android-lib/library' }
maven { url 'https://maven.google.com' }
repositories {
flatDir {
dirs 'libs'
}
}
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
minSdkVersion 19
targetSdkVersion 25
versionCode 10
versionName "1.0.7"
// Instrumentation Test時のMultiDex対応
multiDexEnabled true
testInstrumentationRunner 'android.support.test.MultiDexAndroidJUnitRunner'
}
signingConfigs {
...
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
debug {
signingConfig signingConfigs.debug
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), "proguard/proguard-rules.pro"
proguardFiles fileTree(dir: 'proguard', include: ['*.pro']).asList().toArray()
versionNameSuffix "-build" + getDate() + "-" + getRevisionHash()
buildConfigField "boolean", "USE_CRASHLYTICS", "false"
ext.enableCrashlytics = false
}
beta.initWith(buildTypes.debug)
beta {
signingConfig signingConfigs.release
debuggable false
}
release {
signingConfig signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), "proguard/proguard-rules.pro"
// ProGuard設定を分割してある
proguardFiles fileTree(dir: 'proguard', include: ['*.pro']).asList().toArray()
buildConfigField "boolean", "USE_CRASHLYTICS", "true"
ext.enableCrashlytics = true
}
}
flavorDimensions 'root'
productFlavors {
...
}
packagingOptions {
exclude "lib/arm64-v8a/librealm-jni.so"
exclude "lib/mips/librealm-jni.so"
exclude "lib/x86/librealm-jni.so"
exclude "lib/x86_64/librealm-jni.so"
//exclude "lib/armeabi-v7a/librealm-jni.so"
}
}
configurations.all {
resolutionStrategy {
force "com.android.support:support-annotations:$lib_versions.appcompat"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:appcompat-v7:$lib_versions.appcompat"
compile "com.android.support:design:$lib_versions.appcompat"
compile "com.android.support:multidex:$lib_versions.multidex"
compile 'com.takisoft.fix:preference-v7:25.0.1.0'
compile "com.android.support:multidex:$lib_versions.multidex"
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// SDK
compile project(':ebook')
compile "com.google.android.gms:play-services-analytics:$lib_versions.play_services"
compile 'com.amazonaws:aws-android-sdk-mobileanalytics:2.2.9'
// Crash Log
compile('com.crashlytics.sdk.android:crashlytics:2.5.7@aar') {
transitive = true;
}
//Constraint-Layout
compile 'com.android.support.constraint:constraint-layout:1.0.2'
...
// sdkの依存関係を追加
compile "com.android.support:support-annotations:$lib_versions.appcompat"
compile "com.google.firebase:firebase-core:9.2.0"
compile "com.google.firebase:firebase-messaging:9.2.0"
compile "com.google.android.gms:play-services-gcm:$lib_versions.play_services"
// UI
compile 'info.hoang8f:android-segmented:1.0.6'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
compile 'com.viewpagerindicator:library:2.4.1@aar'
// Tutorial
compile 'com.github.amlcurran.showcaseview:library:5.4.3'
//Facebook SDK
compile 'com.facebook.android:facebook-android-sdk:4.19.0'
// Rx
compile "io.reactivex:rxkotlin:0.60.0"
compile 'io.reactivex:rxandroid:1.2.1'
// Future/Promise pattern
compile "org.jdeferred:jdeferred-android-aar:$lib_versions.jdeferred"
// Ads
compile "com.google.android.gms:play-services-ads:$lib_versions.play_services"
//AppFlyer
compile 'com.appsflyer:af-android-sdk:4.7.4@aar'
// nendメディエーション用アダプター
compile 'net.nend.android:nend-adapter:1.2.7@aar'
// test
testCompile "junit:junit:$lib_versions.junit"
testCompile "org.robolectric:robolectric:$lib_versions.robolectric"
testCompile "com.squareup.assertj:assertj-android:$lib_versions.assertj_android"
// androidTest
androidTestCompile "junit:junit:$lib_versions.junit"
androidTestCompile "com.squareup.assertj:assertj-android:$lib_versions.assertj_android"
androidTestCompile "com.android.support.test:runner:$lib_versions.android_support_test"
androidTestCompile "com.android.support.test:rules:$lib_versions.android_support_test"
androidTestCompile "com.android.support:multidex-instrumentation:$lib_versions.multidex"
}
downloadLicenses {
ext.apacheTwo = license('Apache License, Version 2.0', 'http://opensource.org/licenses/Apache-2.0')
ext.bsd = license('BSD License', 'http://www.opensource.org/licenses/bsd-license.php')
includeProjectDependencies = true
licenses = [
'org.apache.james:apache-mime4j:0.6' : apacheTwo,
'org.some-bsd:project:1.0' : bsd
]
aliases = [
(apacheTwo) : ['The Apache Software License, Version 2.0', 'Apache 2', 'Apache License Version 2.0', 'Apache License, Version 2.0', 'Apache License 2.0', license('Apache License', 'http://www.apache.org/licenses/LICENSE-2.0')],
(bsd) : ['BSD', license('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php')]
]
dependencyConfiguration = 'compile'
}
def getDate() {
def date = new Date()
return date.format("yyyyMMdd")
}
def getRevisionHash() {
return ["sh", "-c", "cd ${project.rootDir} ; git rev-parse --short HEAD"].execute().in.text.trim()
}
// build.gradleの一番下に追加
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-kapt' is missing after apply plugin: 'kotlin-android'
@Zhuinden I tried to add apply plugin: 'kotlin-kapt' it still same error. :(
@beeender I find out the android test class cause the error look like this:
@RunWith(AndroidJUnit4::class)
class DeleteByContentIdTest : Base() {
@Before override fun setup() {
Realm.init(context)
}
@After override fun teardown() {
}
val contentIds = longArrayOf(98765L, 12345L)
val contentCaches = Array(contentIds.count(), {
RealmContentCache(
contentId = contentIds[it],
cacheData = contentIds[it].toString())
}).toList()
@Test fun test1() {
InstrumentationRegistry.getInstrumentation().runOnMainSync {
Realm.deleteRealm(realmConfig)
realm = Realm.getInstance(realmConfig)
subject = RealmContentCacheRepository(realmConfig)
realm.executeTransaction { realm ->
realm.copyToRealm(contentCaches)
}
try {
subject.delete(contentIds[1])
.done {
val equalTo = realm.where(RealmContentCache::class.java)
.equalTo("contentId", contentIds[1])
assertThat(equalTo).isNull()
}
.fail { error ->
fail("something wrong ${error.cause}")
}
.waitSafely(timeOut)
} catch (ex: InterruptedException) {
fail("Timeout")
} finally {
subject.close()
realm.close()
}
}
}
@Test fun test2() {
InstrumentationRegistry.getInstrumentation().runOnMainSync {
Realm.deleteRealm(realmConfig)
realm = Realm.getInstance(realmConfig)
subject = RealmContentCacheRepository(realmConfig)
realm.executeTransaction { realm ->
realm.copyToRealm(contentCaches[0])
}
try {
subject.delete(contentIds[1])
.done { result ->
assertThat(result).isTrue()
val equalTo = realm.where(RealmContentCache::class.java)
.equalTo("contentId", contentIds[1])
assertThat(equalTo).isNull()
}
.fail { error ->
fail("something wrong ${error.cause}")
}
.waitSafely(timeOut)
} catch (ex: InterruptedException) {
fail("Timeout")
} finally {
subject.close()
realm.close()
}
}
}
}
Could you help me check those functions is there wrong within Realm 4.1.1?
Exception error relate to RealmThumbnail.kt class i posted above:
java.lang.AssertionError: something wrong io.realm.exceptions.RealmException: 'class com.company.android.ebook.bookshelf.realm.RealmThumbnail' is not part of the schema for this Realm.
So is this class allow to use with Realm 4.1.1?
You must also make sure that when you add kotlin-kapt, then it is applied BEFORE realm-android.
@Zhuinden my build.gradle like that;
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'
apply plugin: 'io.fabric'
apply plugin: 'com.cookpad.android.licensetools'
I also add for both module app and ebook because both of them use realm lib
I think the class android test error that i posted above may not to use correct way with Realm 3.7.2. or higher. If i remove it and execute ./gradlew connectedCheck that is absolutely success .
Thank you @beeender @Zhuinden for yours support.
Finally we have found wrong point in my internal code so i will close this issue