Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11862] Android: Module package name with underscore throws an exception

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2016-08-25T21:23:07.000+0000
Affected Version/sRelease 2.1.3, Release 5.4.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
Reporterreiji-terasaka
AssigneeEric Merriman
Created2012-11-07T10:25:32.000+0000
Updated2017-03-24T21:58:17.000+0000

Description

I created a module that contains an underline in the package name. For example, "com.ad_stir.ti". However, my module threw the exception.
 
11-07 19:06:21.860: E/TiApplication(4676): java.lang.UnsatisfiedLinkError: nativeBootstrap
11-07 19:06:21.860: E/TiApplication(4676): 	at com.ad_stir.ti.AdstirsdkBootstrap.nativeBootstrap(Native Method)
11-07 19:06:21.860: E/TiApplication(4676): 	at com.ad_stir.ti.AdstirsdkBootstrap.bootstrap(AdstirsdkBootstrap.java:17)
Working Patch
 
--- mobilesdk/linux/2.1.3.GA/module/android/bootstrap.py
+++ mobilesdk/linux/2.1.3.GA/module/android/bootstrap.py
@@ -332,7 +332,7 @@
 		open(genBindings, "w").write(gperfTemplate % gperfContext)
 
 	def generateNative(self, javaTemplate, cppTemplate, javaDir, cppDir):
-		jniPackage = self.moduleId.replace(".", "_")
+		jniPackage = self.moduleId.replace("_", "_1").replace(".", "_")
 		className = self.moduleName[0:1].upper() + self.moduleName[1:]
 
 		context = {

Comments

  1. Chris Barber 2016-08-25

    I cannot reproduce with Titanium SDK 5.4.0.GA. We introduced a new module build system in 5.0.0 that doesn't have a problem. Note: while trying to reproduce this, I uncovered and fixed TIMOB-23827.
  2. Lee Morris 2017-03-24

    Closing ticket as the issue cannot be reproduced and with reference to the previous comments.

JSON Source