Integrating Robobinding into a project with Dagger2

22 views
Skip to first unread message

Simon Craigie

unread,
Mar 16, 2017, 12:34:25 PM3/16/17
to RoboBinding
Hey all,

I am trying to integrate Robobinding with my project however whenever I add "apply plugin: 'org.robobinding.android-aspectj'" to my build.gradle, the compile<App>DebugAspectJ task throws an error indicating that it cannot resolve the Dagger generated classes.

Error:error at import com.example.scraigie.robobindingwithdagger.injection.DaggerAppComponent;
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
D:\dev\Robobinding.With.Dagger\app\src\main\java\com\example\scraigie\robobindingwithdagger\App.java:7:0::0 The import com.example.scraigie.robobindingwithdagger.injection.DaggerAppComponent cannot be resolved
error at sAppComponent = DaggerAppComponent.builder()
                ^^^^^^^^^
D:\dev\Robobinding.With.Dagger\app\src\main\java\com\example\scraigie\robobindingwithdagger\App.java:22:0::0 DaggerAppComponent cannot be resolved
error at import com.example.scraigie.robobindingwithdagger.injection.DaggerActivityComponent;
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
D:\dev\Robobinding.With.Dagger\app\src\main\java\com\example\scraigie\robobindingwithdagger\MainActivity.java:11:0::0 The import com.example.scraigie.robobindingwithdagger.injection.DaggerActivityComponent cannot be resolved
error at mActivityComponent = DaggerActivityComponent.builder()
                     ^^^^^^^^^^
D:\dev\Robobinding.With.Dagger\app\src\main\java\com\example\scraigie\robobindingwithdagger\MainActivity.java:45:0::0 DaggerActivityComponent cannot be resolved
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugAspectJ'.
> The import com.example.scraigie.robobindingwithdagger.injection.DaggerAppComponent cannot be resolved

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Without applying 'org.robobinding.android-aspectj' the build resolves the references to the Dagger generated classes.


Has anyone been able to find a solution to use Robobinding with aspectJ along with Dagger2? 
Message has been deleted
Message has been deleted

wei cheng

unread,
Mar 16, 2017, 6:31:17 PM3/16/17
to robob...@googlegroups.com
Hi Simon,

Is it possible for you to make a smallest example to demo the issue? I will have a look what the cause is when i am next free and get you back. You can use RoboBinding without aspectj for now if it is fine for you.

Cheers, Cheng

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Simon Craigie

unread,
Mar 17, 2017, 5:16:49 AM3/17/17
to RoboBinding
Hey Cheng,

I was not able to attach the project zip to this thread so I have sent it in an email to you. 

Cheers!

Simon
To unsubscribe from this group and stop receiving emails from it, send an email to robobinding...@googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages