dart icon indicating copy to clipboard operation
dart copied to clipboard

Henson doesn't seem work with 2 activities (or more)

Open Marcel50506 opened this issue 9 years ago • 5 comments

Using one activity annotated with HensonNavigable works fine. When adding a second activity, with this annotation, I'm getting compilation errors, see them below. I'm using henson and henson-processor 2.0.1.

I'm not using any InjectExtra annotations.

Error:(40, 8) error: Unable to write henson navigator for types com.examble.app.ui.login.Activity1: Illegal name com.examble.app.ui..Henson Error:(18, 8) error: Unable to write henson navigator for types com.examble.app.ui.tips.Activity2: Illegal name com.examble.app.ui..Henson

Marcel50506 avatar Nov 15 '16 15:11 Marcel50506

I have this same issue as well. I was looking at the code and couldn't figure out what was causing this. the only thing I could easily see to check was if it was mistaking the class as abstract, but doing just a plain old java object didn't fix that.

dmstocking avatar Nov 17 '16 20:11 dmstocking

You should not let henson find the package where it should generate the Henson class.

Instead, use the annotation processor option : "dart.henson.package" "your.package.name"

The wiki explains how to do it with gradle and the apt plugin.

2016-11-17 21:27 GMT+01:00 Buttink [email protected]:

I have this same issue as well. I was looking at the code and couldn't figure out what was causing this. the only thing I could easily see to check was if it was mistaking the class as abstract, but doing just a plain old java object didn't fix that.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/f2prateek/dart/issues/136#issuecomment-261359873, or mute the thread https://github.com/notifications/unsubscribe-auth/ABv33fiWlN8iUCfeYTMzSek5AlWLTZ80ks5q_LidgaJpZM4Kyp_m .

stephanenicolas avatar Nov 19 '16 08:11 stephanenicolas

The readme explains it, sorry

2016-11-19 9:39 GMT+01:00 Stéphane NICOLAS [email protected]:

You should not let henson find the package where it should generate the Henson class.

Instead, use the annotation processor option : "dart.henson.package" "your.package.name"

The wiki explains how to do it with gradle and the apt plugin.

2016-11-17 21:27 GMT+01:00 Buttink [email protected]:

I have this same issue as well. I was looking at the code and couldn't figure out what was causing this. the only thing I could easily see to check was if it was mistaking the class as abstract, but doing just a plain old java object didn't fix that.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/f2prateek/dart/issues/136#issuecomment-261359873, or mute the thread https://github.com/notifications/unsubscribe-auth/ABv33fiWlN8iUCfeYTMzSek5AlWLTZ80ks5q_LidgaJpZM4Kyp_m .

stephanenicolas avatar Nov 19 '16 08:11 stephanenicolas

This issue will be solve in the new version of Henson supporting modularization.

dlemures avatar Sep 21 '17 18:09 dlemures

@stephanenicolas @dlemures "dart.henson.package" "your.package.name" - This your.package.name should be a package name of destination class (@HensorNavigable, Dart.inject(this)) or receiving class (Henson.with(this).goto...) ?. You have mentioned it in the docs, but some how wrong import is auto generated with some random class names that is actually not required for the class. Please help me. I am in super urgency to solve this issue

ckdevrel avatar Oct 12 '17 07:10 ckdevrel