Search code examples
androidaspectjtitanium-mobileappcelerator-mobiletitanium-modules

Aspect J implementing in Titanium Android Module


I have tried to include Aspect J runtime library in to by creating titanium android module project in Titanium Studio & it was successful. Is there any luck to use aspect j pointcuts inside of a .aj files by adding those in module project, for Titanium mobile project (android)? Since as far as I can see aspect j (run time aspect not compile time) is not working in this scenario. Is there any answer for this? -- Thanks


Solution

  • Runtime aspectj wont work for a number of reasons - not the least of which being that Android uses a completely different virtual machine than the JVM to run on - and it uses a completely different bytecode format.

    The reason compile-time-weaving can work for AspectJ is because the way android has a build step where it can convert java bytecode into dex bytecode.