{ "id": "171458", "key": "TIMOB-25932", "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": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-08-20T15:59:49.000+0000", "created": "2018-04-04T19:04:55.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "ant", "build", "jdk", "sdk" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-10-15T20:25:33.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": "*Summary:*\r\nIf you attempt to build the Titanium SDK (ie: titanium_mobile) with JDK 10 installed, the build will fail due to a missing \"javah\" tool. This tool has been removed in JDK 10.\r\n\r\n*Steps to reproduce:*\r\n# Instal JDK 10 if not done already.\r\n# Open the terminal.\r\n# {{cd}} to the {{titanium_mobile/build}} directory.\r\n# Enter: {{node scons.js build android}}\r\n\r\n*Result:*\r\nBuild fails due to missing \"javah\" tool.\r\n\r\n*Work-Around:*\r\nBuild with JDK 8 or 9.\r\n\r\n*Recommended Solution:*\r\nRemove Titanium's usage of the \"javah\" tool and the {{#include}}'s to the generated headers files. They're not needed.\r\n\r\nThe generated header files and function prototypes are useless by themselves. We have to create the function implementation ourselves, which we've already done and they're already publicly exported via {{JNIEXPORT}} in their respective C++ files. Since the implementation side already exports the functions, the function prototypes are not needed.\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/runtime/v8/src/native/JSDebugger.cpp\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/runtime/v8/src/native/V8Object.cpp\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/runtime/v8/src/native/V8Runtime.cpp\r\n\r\n\r\n----\r\n*Original Description:*\r\nJDK 10 has dropped the {{javah}} tool (http://openjdk.java.net/jeps/313) which is required by our tooling when building the Android platform. We need to use {{javac}}'s {{-h}} flag instead. {{javah}} generated the header files from the compiled {{.class}} files in the jars, however {{javac -h}} used the original {{.java}} files.\r\n\r\nWe'll likely have to move the header generation out of the native compile step and into the Java compile step. We can do this by specifying the {{nativeheaderdir}} attribute in the {{javac}} task in the {{common.xml}} file. However, the {{nativeheaderdir}} attribute is only supported in ant 1.9.8+ (https://ant.apache.org/manual/Tasks/javac.html) and we ship {{ant}} 1.8.0 with Titanium. The Android build also depends on {{ant-contrib}} and {{ant-nodeps}} which may not be compatible with ant 1.9.8 or newer.\r\n\r\nIn the meantime, we'll have to use JDK 9 to build the Titanium SDK.", "attachment": [], "flagged": false, "summary": "Android: Cannot build SDK with JDK 10 (missing javah tool)", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 1065, "state": "closed", "name": "2016 Sprint 17 SDK", "startDate": "2018-08-13T17:39:36.846Z", "endDate": "2018-08-27T17:39:00.000Z", "completeDate": "2018-08-29T16:10:57.013Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "440783", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10257", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-15T05:17:36.000+0000", "updated": "2018-08-15T05:17:36.000+0000" }, { "id": "442631", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on master 7.5 version. build successfully built and run on android in Mac as well as windows. Closing.\r\n{code}\r\nMac configuration:\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version =master 7.5\r\nDevice\t\t\t\t=Pixel 2 xl android 8 emulator\r\n{code} \r\n{code}\r\nWindows configurations\r\n Name = Microsoft Windows 10 Pro \r\n Version = 10.0.17134 \r\n Architecture = 64bit \r\n Node.js \r\n Node.js Version = 8.9.1 \r\n npm Version = 5.5.1 \r\nTitanium CLI \r\n CLI Version = 5.1.1 \r\nTitanium SDK \r\n SDK Version = master 7.5 \r\nDevice \r\nSamsung s5 android 6 device\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-10-15T20:25:23.000+0000", "updated": "2018-10-15T20:25:23.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }