Realm-java: Realm 5.x not working with Parceler

Created on 30 May 2018  Â·  6Comments  Â·  Source: realm/realm-java

Goal

To make it compile

Actual Results

Compile errors, it seems like the proxy files are not generated. I posted here first since I thought it was a problem with Parceler.

Steps & Code to Reproduce

Test to compile this test app.

Version of Realm and tooling

Realm version(s): 5.1.0

Realm sync feature enabled: no

Android Studio version: 3.1

T-Doc

Most helpful comment

The docs have been updated.

All 6 comments

No, they're just called fully_qualified_name_YourClassRealmProxy instead of YourClassRealmProxy.

Thanks for the answer! I didn't see any documentation of that in the change log and the Realm documentation is also not updated when it comes to Parceler. But then I think I'll be able to fix it.

@cmelchior apparently the docs are outdated and i didn't notice, just answered peeps, whoops :stuck_out_tongue:

The docs have been updated.

@Zhuinden @cmelchior I'm facing this issue again with the latest version of Realm & Parceler.

Implementation

import io.realm.com_example_demo_model_DataRealmProxy;
@Parcel(implementations = {com_example_demo_model_DataRealmProxy.class},
value = Parcel.Serialization.BEAN,
analyze = {Data.class})
public class Data extends RealmObject{
...
}

Error

cannot find symbol class com_example_demo_model_DataRealmProxy
build_failed.txt

Tried

  1. Comment the @Parcel annotation code.
  2. Delete unused imports.
  3. Clean->Rebuild
  4. Uncomment the @Parcel annotation code.
  5. Run.

This is working fine, But when I uninstall the APK and try to run the project again, compilation fails.

Is there any issue with gradle or parceler?

Versions:
Realm: 5.3.1 (Realm sync disabled)

Android Studio 3.1.3
Build #AI-173.4819257, built on June 4, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0)

Gradle: gradle-4.4-all

Parceler: 1.1.11

@Zhuinden @cmelchior seems like it was an issue with Gradle, After cleaning Gradle cache using gradlew cleanBuildCache it worked fine.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jjorian picture jjorian  Â·  3Comments

Merlin1993 picture Merlin1993  Â·  3Comments

yuwu picture yuwu  Â·  3Comments

cmelchior picture cmelchior  Â·  3Comments

David-Kuper picture David-Kuper  Â·  3Comments