getting it to work using the jar file

32 views
Skip to first unread message

Johnny TwoShoes

unread,
Dec 10, 2015, 9:52:25 AM12/10/15
to RoboBinding
Hi,

I have got it working using gradle, but when I replace it with the jar file, it doesn't run:
                                                    Caused by: java.lang.RuntimeException: The source code for 'com.example.xx.myapplicationrobobindingjar.MainActivityViewModel$$PM' is not generated. Is Java annotation processing(source code generation) correctly configured?
                                                       at org.robobinding.binder.PresentationModelObjectLoader.load(PresentationModelObjectLoader.java:31)
                                                       at org.robobinding.binder.ViewBinderImpl.inflateAndBind(ViewBinderImpl.java:35)
                                                       at org.robobinding.binder.Binders.inflateAndBind(Binders.java:42)
                                                       at org.robobinding.binder.Binders.inflateAndBind(Binders.java:35)
                                                       at org.robobinding.binder.Binders.inflateAndBindWithoutPreInitializingViews(Binders.java:58)
                                                       at com.example.iqbalhajat.myapplicationrobobindingjar.MainActivity.onCreate(MainActivity.java:20)

code in activity is:
MainActivityViewModel presentationModel = new MainActivityViewModel();
View rootView = Binders.inflateAndBindWithoutPreInitializingViews(this, //line 20
R.layout.activity_main,
presentationModel);

wei cheng

unread,
Dec 11, 2015, 5:29:53 AM12/11/15
to robob...@googlegroups.com
Hi Johnny,

This is because you have not set up code generation for ViewModels. Please check the setting here line 63 - https://github.com/RoboBinding/AndroidMVVM/blob/master/app/build.gradle.

You would suggest to use Gradle instead of local jars, as there are a couple of dependencies by code-gen.

Cheers,
Cheng Wei

--
You received this message because you are subscribed to the Google Groups "RoboBinding" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robobinding...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages