Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Building an Android module in 3.4.1

$
0
0

I am trying to create a module in Ti studio and I was unable to build the Android version (iOS worked with no issue) of the module before I even started writing my own code until I modified the Ti build scripts - which I would hope they tested enough for me to not have to do when just creating a default project. I create a new Mobile Module project via the file new menu and click "Package" "Android Module" and the build failed for 2 reasons prior to me modifying the scripts.

The first error was that the NDK couldn't be found during the build. This was remedied by hardcoding the path to my NDK in the Titanium/mobilesdk/osx/3.4.1.GA/module/android/build.xml file as so:

The place where my path is now was originally ${android.ndk} starting at line 257…

<condition property="ndk.path" value="/dev/android-ndk-r10c" else="${env.ANDROID_NDK}">
    <isset property="android.ndk"/>
</condition>
I have my ANDROID_NDK environment variable and the android.ndk in the build properties file set to the exact same path which is what the documentation called for me to do.

The second error was that the build system couldn't find the android-10 SDK. The build.properties auto set this to android-14. After I modified this to android-10 it still didn't work. I had to hard code the path to my sdk in the following file: Titanium/mobilesdk/osx/3.4.1.GA/android/androidsdk.py as follows starting at line 125:

(I added the second line to override the first line)
platform_dir = self.find_dir(api_level, os.path.join('platforms', 'android-'))
platform_dir = "/dev/android-sdk-macosx/platforms/android-10"
As I said, after these 2 modifications my module finally built but I would prefer to revert these changes as I am hoping I just missed something that said what actually needed to be set for those paths to be found properly. Otherwise it's just a bug in their build system.

Any help would be greatly appreciated.

Ti studio = 3.4.1.201410281727

OSX = 10.8.5


Viewing all articles
Browse latest Browse all 8068

Trending Articles