{ "id": "88066", "key": "TIMOB-8505", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13277", "name": "Sprint 2012-08", "archived": true, "released": true, "releaseDate": "2012-04-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-04-26T10:22:52.000+0000", "created": "2012-03-16T10:22:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_module", "pe-planning-2012-08", "qe-port", "regression" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-06-20T12:29:51.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Marshall's post on using native libraries in an Android module (http://developer.appcelerator.com/blog/2011/01/titanium-and-the-android-ndk.html) states that you need to place C++ source files in the jni directory of the module project and they will be compiled into .so files and included in the module. This is not the case in version 1.8.2 of the SDK -- the build.xml file under TITANIUM_HOME/mobilesdk/osx/1.8.2/modules/android never looks in that directory. To get the described behavior, the following targets can be added to the module's build.xml file:\r\n\r\n{code:xml}\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n{code}\r\n\r\nIdeally, these targets would be part of the SDK's build.xml. In the meantime, it would be good to update the blog post to indicate that it is out of date.", "attachment": [ { "id": "27277", "filename": "jni_module.tar.gz", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-18T20:22:31.000+0000", "size": 4858, "mimeType": "application/x-gzip" } ], "flagged": false, "summary": "Android: Module build.xml no longer compiles C++ source code in the \"jni\" directory", "creator": { "name": "pegli", "key": "pegli", "displayName": "Paul Mietz Egli", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pegli", "key": "pegli", "displayName": "Paul Mietz Egli", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 1.8.2", "comment": { "comments": [ { "id": "189697", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note: We should move (and update if necessary) the old blog post content over to Wiki so it is easier to find for people who want to use C++ modules", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-03T13:33:44.000+0000", "updated": "2012-04-03T13:33:44.000+0000" }, { "id": "191744", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The following should be reviewed as part of resolving this ticket:\r\n\r\n[Step 2: Understanding the Different Parts of a Module : \"jni\"|https://wiki.appcelerator.org/display/guides2/Android+Module+Development+Guide#AndroidModuleDevelopmentGuide-Step2%3AUnderstandingtheDifferentPartsofaModule]", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-18T20:10:30.000+0000", "updated": "2012-04-18T20:10:30.000+0000" }, { "id": "191745", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h4. Testing\r\n----\r\n\r\n# Download the attached jni_module.tar.gz\r\n# Build the module from source (org.appcelerator.jnitest)\r\n# Create a new Titanium application for Android (either command line or studio) with the following {{app.js}}:\r\n{code}\r\nvar native = require('org.appcelerator.jnitest');\r\nalert(native.hello());\r\n{code}\r\n# Add v0.1 of 'org.appcelerator.jnitest' as a module dependency for the application, and copy the dist built from step 2. above either into the project or the Titanium install directory.\r\n# Run the application on an Android device or emulator\r\n\r\n*SUCCESS*: You see an alert with the contents \"Hello from JNI!\"\r\n*FAIL*: Any other result\r\n", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-18T20:30:30.000+0000", "updated": "2012-04-18T20:30:53.000+0000" }, { "id": "199393", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206200844\r\nTi Mobile SDK 2.1.0.v20120619172256 hash rd3a84b13\r\nOSX Lion 10.7.3\r\nNexus S OS 4.0.4\r\n\r\nThe expected behavior is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-20T12:29:51.000+0000", "updated": "2012-06-20T12:29:51.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }