{ "id": "174872", "key": "MOD-2590", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-04-22T17:31:41.000+0000", "created": "2020-03-30T19:26:52.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "facebook", "gradle", "module", "ti.barcode" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-04-22T17:31:41.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": "14511", "name": "Barcode" } ], "description": "*Summary:*\r\nAn Android app build will fail if it include the following modules at the same time...\r\n* ti.barcode (v5.0.0)\r\n* facebook (v9.0.0)\r\n\r\n*Steps to reproduce:*\r\n# Create a new project targeting Titanium 9.0.0.\r\n# Set up the \"tiapp.xml\" with the below modules.\r\n# Build for Android.\r\n\r\n{code:xml}\r\n\r\n\t\r\n\t\tfacebook\r\n\t\tti.barcode\r\n\t\r\n\r\n{code}\r\n\r\n*Result:*\r\nYou'll get several build error regarding duplicate Java classes under the \"com.google.zxing\" package.\r\n{code}\r\n[ERROR] : [GRADLE] java.lang.RuntimeException: Duplicate class com.google.zxing.BarcodeFormat found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and core-3.3.3.jar (ti:barcode:5.0.0)\r\n[ERROR] : [GRADLE] Duplicate class com.google.zxing.Binarizer found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and core-3.3.3.jar (ti:barcode:5.0.0)\r\n[ERROR] : [GRADLE] Duplicate class com.google.zxing.BinaryBitmap found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and core-3.3.3.jar (ti:barcode:5.0.0)\r\n[ERROR] : [GRADLE] Duplicate class com.google.zxing.ChecksumException found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and core-3.3.3.jar (ti:barcode:5.0.0)\r\n[ERROR] : [GRADLE] Duplicate class com.google.zxing.DecodeHintType found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and core-3.3.3.jar (ti:barcode:5.0.0)\r\n[ERROR] : [GRADLE] Duplicate class com.google.zxing.Dimension found in modules core-3.3.3.jar (com.google.zxing:core:3.3.3) and core-3.3.3.jar (ti:barcode:5.0.0)\r\n{code}\r\n\r\n*Cause:*\r\nWhen we migrated the \"facebook\" module to gradle for Titanium 9.0.0, it ended up including the same zxing core library that our \"ti.barcode\" module uses which caused the above class name conflict.\r\n[facebook-common/build.gradle#L39|https://github.com/facebook/facebook-android-sdk/blob/ca9ba9cee5ababe944619aee76884708acc6b482/facebook-common/build.gradle#L39]\r\n\r\n*Solution:*\r\nUpdate the \"ti.barcode\" module's \"build.gradle\" file to use the below dependencies and delete it's \"lib\" folder of JARs. This way gradle/maven's dependency management can resolve this for us.\r\n{code:groovy}\r\ndependencies {\r\n\timplementation 'com.google.zxing:core:3.4.0'\r\n\timplementation 'com.google.zxing:android-core:3.3.0'\r\n\timplementation 'com.google.zxing:android-integration:3.3.0'\r\n}\r\n{code}\r\n\r\n*Work-Around:*\r\nAdd file {{./platform/android/build.gradle}} under your project with below contents.\r\n_(Note that this work-around will need to be removed when we fix the \"ti.barcode\" module or else a runtime error will occur.)_\r\n{code:groovy}\r\nconfigurations {\r\n\timplementation {\r\n\t\t// Work-around which excludes ZXing JARs until \"ti.barcode\" module has been updated to v5.0.1.\r\n\t\t// You'll need to remove this once you upgrade to \"ti.barcode\" 5.0.1 or else runtime errors will occur.\r\n\t\texclude group: 'com.google.zxing', module: '*'\r\n\t}\r\n}\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Modules \"ti.barcode\" and \"facebook\" conflict as of 9.0.0", "creator": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1190, "state": "closed", "name": "2020 Sprint 7", "startDate": "2020-03-27T16:30:21.583Z", "endDate": "2020-04-10T16:30:00.000Z", "completeDate": "2020-04-10T17:43:27.544Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "454911", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator-modules/ti.barcode/pull/126", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-30T22:15:33.000+0000", "updated": "2020-03-30T22:15:33.000+0000" }, { "id": "454922", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-31T21:50:56.000+0000", "updated": "2020-03-31T21:50:56.000+0000" }, { "id": "455211", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with module 5.0.1.\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-04-22T17:31:35.000+0000", "updated": "2020-04-22T17:31:35.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }