I am trying to develop an android module for titanium mobile 1.8.1. Here are the tools I am using:
- Titanium studio: 1.0.7
- Titanium mobile sdk: 1.8.1
- Android SDK: r16
- Android NDK: r7 (platform: API 8 + google APIs)
- cygwin: 1.7.9-1
- ant: 1.8.2
- gperf: latest
I am following the instructions from here:
https://wiki.appcelerator.org/display/guides/Android+Module+Development+Guide
and here:
https://wiki.appcelerator.org/display/guides/Android+Module+Porting+Guide+for+1.8.0.1
I have set-up all the PATH and environment variables as requested.
I am working from command line, using ant (not using eclipse) to build the module.
I am trying to build the module skeleton that was created by titanium “create” command.
When building, I get cpp errors, like:
jni/<domain>.mymodule.ExampleProxy.h:22: error: expected class-name before '{' token
The lines of code producing the error are:
class ExampleProxy : public titanium::Proxy
{
From my c++ experience, this happens when the parent class is not defined.
But the source file appears to be correctly including a “Proxy.h” file, from the titanium sdk, that correctly defines class “Proxy”, in the “titanium” namespace.
Has anyone experienced the same problem and found a solution, or can in some way offer a useful hint?
Check that your module has no namespace (com.giorgio.module to gorgiomodule) and avoid special characters.
Generated code does not handle all cases.