Start a new topic

Integrating SDK and running in app created using Titanium

Integrating SDK and running in app created using Titanium


SOLUTION: Install Mobile module and set output location equal to Mobile Project

Hi friends, i have problem with de AndroidModule Titanium integration. I followed all instructions in the forum but still gives me error and does not know what I can do.

Environment:
windows 7
titanium 3.1.3 GA



1) I imported WikitudeAndroidModule into Titanium.

2) Copy the wikitudesdk.jar into lib directory.

3) I modified build.properties with:
android.ndk=C:Users\Juan\Downloads\android-ndk-r9-windows-x86_64\android-ndk-r9
android.sdk=C:\Users\Juan\Downloads\adt-bundle-windows-x86_64-20130219\adt-bundle-windows-x86_64-20130219\sdk
titanium.platform=C:\Users\Juan\AppData\Roaming\Titanium\mobilesdk\win32\3.1.3.GA\android
android.platform=C:\Users\Juan\Downloads\adt-bundle-windows-x86_64-20130219\adt-bundle-windows-x86_64-20130219\sdk\platforms\android-8
google.apis=C:\Users\Juan\Downloads\adt-bundle-windows-x86_64-20130219\adt-bundle-windows-x86_64-20130219\sdk\add-ons\addon-google_apis-google-8

4) I Run Package- Android Module (Select Titanium sdk) and show me the error C:\Users\Juan\Documents\Titanium_Studio_Workspace\wikitudeand\build.xml:10: Cannot find C:\Program Files\Titanium\module\android\build.xml imported from C:\Users\Juan\Documents\Titanium_Studio_Workspace\wikitudeand\build.xml

Error
ti:/module.js
Message: Uncaught Error: Requested module not found: com.wikitude.ti

This is when i install the Sample.

There is an easier way to integrate it into Titanium?

anyone can help?

Best Regards

Juan

Hi tim,

your framework search path is not set correctly. You can have a look at the search path by opening the module.xcconfig which is located in the iOS Wikitude module folder. Please adjust eather the path to point to your WikitudeSDK.framework or move the .framework into the appropriate location. Please remember: The path is referencing the final Xcode project file as its root. The project is located in *PROJECTNAME*/build/iphone/*PROJECTNAME.xcodeproj*.

 

Best regards

Andreas

Hi I dowonload the Wikitude SDK(iSO) and copy  the the "Framework" folder to the Titanium Studio Workspace and as same level as the project file, but it still show up the error

:  ** BUILD FAILED **

:  The following build commands failed:

:  Ld build/Debug-iphonesimulator/appname.app/appname normal i386

:  (1 failure)

anyone can help?
path as fallow 

Framework:
 Documents/Titanium Studio Workspace/Framework    (inside this folder there have "Headers(folder)"?"Resources(folder)"?WikitudeSDK)

Project:
Documents/Titanium Studio Workspace/WikitudeTitaniumSample

I cannot manage to build the module on android,

I set all paths and include all libraries (except js.jar which is not present in my 3.1.1.GA SDK).

When building I get the following:

 

Buildfile: /Users/myuser/git/wikitude-titanium/WikitudeAndroidModule/build.xml

python.set.exec:

python.check:

      Testing for Python

      Python 2.7.2

init:

process.annotations:

generate.v8.bindings:

      Generating /Users/myuser/git/wikitude-titanium/WikitudeAndroidModule/build/generated/jni/com.wikitude.ti.WikitudeModule.h

      Generating /Users/myuser/git/wikitude-titanium/WikitudeAndroidModule/build/generated/jni/com.wikitude.ti.WikitudeModule.cpp

      Generating /Users/myuser/git/wikitude-titanium/WikitudeAndroidModule/build/generated/jni/com.wikitude.ti.WikitudeViewProxy.h

      Generating /Users/myuser/git/wikitude-titanium/WikitudeAndroidModule/build/generated/jni/com.wikitude.ti.WikitudeViewProxy.cpp

generate.bindings:

pre.compile

js.compile:

ndk.build:

      Copying 11 files to /var/folders/1t/364_zzg50679td75yznq_rf80000gn/T/myuser/wikitudeand-generated

      jni/Android.mk:32: warning: overriding commands for target `/private/var/folders/1t/364_zzg50679td75yznq_rf80000gn/T/myuserAndroid NDK: WARNING:jni/Android.mk:com.wikitude.ti: non-system libraries in linker flags: -lkroll-v8    

      Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES    

      Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the    

      Android NDK:     current module    

      Android NDK: WARNING:jni/Android.mk:com.wikitude.ti: non-system libraries in linker flags: -lkroll-v8    

      Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES    

      Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the    

      Android NDK:     current module    

      Android NDK: WARNING:jni/Android.mk:com.wikitude.ti: non-system libraries in linker flags: -lkroll-v8    

      Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES    

      Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the    

      Android NDK:     current module    

      /wikitudeand-generated/KrollGeneratedBindings.cpp'

      jni/Android.mk:32: warning: ignoring old commands for target `/private/var/folders/1t/364_zzg50679td75yznq_rf80000gn/T/myuser/wikitudeand-generated/KrollGeneratedBindings.cpp'

      jni/Android.mk:35: warning: overriding commands for target `/private/var/folders/1t/364_zzg50679td75yznq_rf80000gn/T/myuser/wikitudeand-generated/BootstrapJS.cpp'

      jni/Android.mk:35: warning: ignoring old commands for target `/private/var/folders/1t/364_zzg50679td75yznq_rf80000gn/T/myuser/wikitudeand-generated/BootstrapJS.cpp'

      jni/Android.mk:32: warning: overriding commands for target `/private/var/folders/1t/364_zzg50679td75yznq_rf80000gn/T/myuser/wikitudeand-generated/KrollGeneratedBindings.cpp'

      jni/Android.mk:32: warning: ignoring old commands for target `/private/var/folders/1t/364_zzg50679td75yznq_rf80000gn/T/myuser/wikitudeand-generated/KrollGeneratedBindings.cpp'

      jni/Android.mk:35: warning: overriding commands for target `/private/var/folders/1t/364_zzg50679td75yznq_rf80000gn/T/myuser/wikitudeand-generated/BootstrapJS.cpp'

      jni/Android.mk:35: warning: ignoring old commands for target `/private/var/folders/1t/364_zzg50679td75yznq_rf80000gn/T/myuser/wikitudeand-generated/BootstrapJS.cpp'

      Compile++ thumb  : com.wikitude.ti <= com.wikitude.ti.WikitudeModule.cpp

      In file included from jni/com.wikitude.ti.WikitudeModule.cpp:12:0:

      /Users/myuser/Library/Application Support/Titanium/mobilesdk/osx/3.1.1.GA/android/native/include/AndroidUtil.h: In destructor 'titanium::LogTimer::~LogTimer()':

      /Users/myuser/Library/Application Support/Titanium/mobilesdk/osx/3.1.1.GA/android/native/include/AndroidUtil.h:57:3: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long int'

      jni/com.wikitude.ti.WikitudeModule.cpp: In static member function 'static v8::Handle<v8::Value> com::wikitude::ti::WikitudeModule::example(const v8::Arguments&)':

      jni/com.wikitude.ti.WikitudeModule.cpp:130:4: error: format not a string literal and no format arguments

      jni/com.wikitude.ti.WikitudeModule.cpp: In static member function 'static v8::Handle<v8::Value> com::wikitude::ti::WikitudeModule::getter_exampleProp(v8::Local<v8::String>, const v8::AccessorInfo&)':

      jni/com.wikitude.ti.WikitudeModule.cpp:185:4: error: format not a string literal and no format arguments

      jni/com.wikitude.ti.WikitudeModule.cpp: In static member function 'static void com::wikitude::ti::WikitudeModule::setter_exampleProp(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::AccessorInfo&)':

      jni/com.wikitude.ti.WikitudeModule.cpp:244:4: error: format not a string literal and no format arguments

      cc1plus: some warnings being treated as errors

      make: *** Error 1

 

BUILD FAILED

/Users/myuser/Library/Application Support/Titanium/mobilesdk/osx/3.1.1.GA/module/android/build.xml:326: The following error occurred while executing this line:

/Users/myuser/Library/Application Support/Titanium/mobilesdk/osx/3.1.1.GA/module/android/build.xml:281: exec returned: 2

 

Total time: 5 seconds

 

Any suggestions?

Anything wrong with the module code? I fetched it yesterday from github.

I had all of these problems and have just managed to get it working on both iOS snd Android so thought i'd throw in how i did it here, as it took a lot of head scratching:

 

iOS:

 

Error:

 


:  ** BUILD FAILED **

:  The following build commands failed:

:   Ld build/Debug-iphonesimulator/ModuleSamples.app/ModuleSamples normal i386

:  (1 failure)

 


Solution:

 

The key to this is that the 'Framework' folder. Its all there in the docs but I admit it's easy to miss when you are rushing through it. Firstly you must download the iOS version of the SDK. Inside it you will find the 'Framework' folder, copy this and paste it into a directory alongside your titanium project.

 

e.g. if your project is located at: /projects/myProject then you should also have: /projects/Framework

 

Android

 

Error:

 

Message: Uncaught Error: Requested module not found: com.wikitude.ti

 

Solution:

 

This is where the docs confused me. I thought that I could download the pre-built module from github and copy in the latest wikitudesdk.jar file. This did not work for me!

 

Instead i needed to

- import the source code for the module into Titanium,

- update all of the paths to use my local files (look at build.properties and properties -> java build path)

- copy in the latest version of wikitudesdk.jar file into the lib foldes

- compile and copy to my project

 

this created another error:

 


Error:

 


/Sdks/wikitude-titanium/WikitudeAndroidModule/assets does not exist. You may need to install the Command Line Tools package through XCode, in case you haven't done so yet.


 

Solution:

 

I already had the command line tools installed so i took a guess and cerated the assets folder in the module.... worked a treat.

 

 

I hope this helps anyone else who is struggling to work it out!

Hi,

iOS answer: the framework search path is not set correctly: please have a look at the wikitude module module.xcconfig file and enter the correct path to the WikitudeSDK.framework.

I've followed the documentation. I've built a module using the WikitudeIOSModule which is in the github and am running the sample code that is provided in the github as well. When i try to run it in simulator, this error came out:

~~~

:  ** BUILD FAILED **

:  The following build commands failed:

:  Ld build/Debug-iphonesimulator/ModuleSamples.app/ModuleSamples normal i386

:  (1 failure)

~~~

 

I've copied the framework file into the IOSModule when build and also on the same level as the titanium project folder in a folder called WikitudeSDK. Why is this error coming out? Is there anything else that I need to do before compiling the module? Or is there something that I did wrong?

 

I'm using SDK 3.1.1 from titanium.

 

As for Android, yes it runs but when I want to open function such as Image Recognition > Image on Target, This error came out:

 

~~~

06-27 15:15:52.789: E/TiExceptionHandler(19655): (main) ----- Titanium Javascript Runtime Error -----

06-27 15:15:52.789: E/TiExceptionHandler(19655): (main) - In ti:/module.js:280,9

06-27 15:15:52.789: E/TiExceptionHandler(19655): (main) - Message: Uncaught Error: Requested module not found: com.wikitude.ti

06-27 15:15:52.789: E/TiExceptionHandler(19655): (main) - Source: throw new Error("Requested module not found: " + request);

06-27 15:15:52.814: E/V8Exception(19655): Exception occurred at ti:/module.js:280: Uncaught Error: Requested module not found: com.wikitude.ti

06-27 15:15:54.309: W/ActivityManager(2099): mDVFSLock.acquire()

~~~

Hi

we just updated the documentation for Titanium Module for Wikitude SDK, which also covers setup, configuration and getting started. Please have a look at this document, which should resolve your problem. 

Hi guys,

 

I'm quite new to developing and I now want to include AR in my app. I'm building using Titanium.

I've downloaded the iOS and Android SDK as well as the Titanium module from the github. Now the problem is that I don't know how to integrate the SDK at all into my Titanium app. ( where to copy the file to)

 

Anyone who have work this into Titanium can pls guide me so that I can work with this? I want this to work on both iOS and Android. A step-by-step instruction would be helpful.
Login or Signup to post a comment