{ "id": "124856", "key": "AC-2423", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-07-14T22:26:16.000+0000", "created": "2014-01-16T02:28:33.000+0000", "labels": [ "android", "module", "proGarud", "progarud.cfg", "shareSDK" ], "versions": [], "issuelinks": [ { "id": "34319", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "63414", "key": "TIMOB-2782", "fields": { "summary": "Android: Generate a Proguard configuration based on API usage", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:27.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": [], "description": " The 'proguard.cfg' must exists in \"$project-dir/platform/android\" even if the 'proguard.cfg' exists in module('platform/android').\r\n\r\n There are no way to config 'this.proguard' in '_build.js'. I think the module could config 'this.proguard' in build.xml or timodule.xml.\r\n\r\n I know this feature will be publish in 3.3.0, but I need it right now. So I try to modify '_build.js', I read about proGuard in \"http://proguard.sourceforge.net/index.html#manual/usage.html\", I have some questions.\r\n\r\n The option \"-injars\" need set file-path, I do not know clearly which folder has \"*.jar\". Which is core in titanium , which is third-party in module. \"_build.js\" seems create temp folder to build and compile \"*.jar\". PS: The \"$project-dir/build/android/lib\" has not any \"*.jar\", I confuse it.\r\n When executes the process \"runProguard\"? My purpose is using third-party \"shareSDK\" what is a SDK of Chinese social sharing platform. (http://sharesdk.cn)\r\n\r\n{code}\r\n I try build shareSDK in module and install into device of android mobile, it will throw like this:\r\n [exec] [INFO] Compiling Android Resources... This could take some time\r\n [exec] [DEBUG] /Users/apple/android-sdk/platform-tools/dx -JXmx1536M -JXX:-UseGCOverheadLimit --dex --output=/var/folders/w2/khz8t6h10q51lx_hvw8ds9wr0000gn/T/mRMP1dUti/cleansharesdk/build/android/bin/classes.dex /var/folders/w2/khz8t6h10q51lx_hvw8ds9wr0000gn/T/mRMP1dUti/cleansharesdk/build/android/bin/classes \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/kroll-v8.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/modules/titanium-media.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/modules/titanium-locale.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/modules/titanium-platform.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/modules/titanium-ui.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/ti-commons-codec-1.3.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/kroll-common.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/modules/titanium-analytics.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/modules/titanium-app.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/titanium.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/jaxen-1.1.1.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/nineoldandroids-appc-2.4.0.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/modules/titanium-android.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/android-support-v4.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/modules/titanium-filesystem.jar\" /var/folders/w2/khz8t6h10q51lx_hvw8ds9wr0000gn/T/mRMP1dUti/cleansharesdk/modules/android/com.baidao.sharesdk/0.1/cleansharesdk.jar /var/folders/w2/khz8t6h10q51lx_hvw8ds9wr0000gn/T/mRMP1dUti/cleansharesdk/modules/android/com.baidao.sharesdk/0.1/lib/mframework.jar /var/folders/w2/khz8t6h10q51lx_hvw8ds9wr0000gn/T/mRMP1dUti/cleansharesdk/modules/android/com.baidao.sharesdk/0.1/lib/ShareSDK-Core-2.3.1.jar \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/lib/titanium-verify.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/lib/titanium-debug.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/lib/titanium-profiler.jar\" \"/Users/apple/Library/Application Support/Titanium/mobilesdk/osx/3.2.0.GA/android/modules/titanium-network.jar\"\r\n [exec] [WARN] warning: Ignoring InnerClasses attribute for an anonymous inner class\r\n [exec] [ERROR] (cn.sharesdk.framework.a) that doesn't come with an\r\n [exec] [ERROR] associated EnclosingMethod attribute. This class was probably produced by a\r\n [exec] [ERROR] compiler that did not target the modern .class file format. The recommended\r\n [exec] [ERROR] solution is to recompile the class from source, using an up-to-date compiler\r\n [exec] [ERROR] and without specifying any \"-target\" type options. The consequence of ignoring\r\n [exec] [ERROR] this warning is that reflective operations on this class will incorrectly\r\n [exec] [ERROR] indicate that it is *not* an inner class.\r\n [exec] [WARN] warning: Ignoring InnerClasses attribute for an anonymous inner class\r\n [exec] [ERROR] (cn.sharesdk.framework.a.j) that doesn't come with an\r\n [exec] [ERROR] associated EnclosingMethod attribute. This class was probably produced by a\r\n [exec] [ERROR] compiler that did not target the modern .class file format. The recommended\r\n [exec] [ERROR] solution is to recompile the class from source, using an up-to-date compiler\r\n [exec] [ERROR] and without specifying any \"-target\" type options. The consequence of ignoring\r\n [exec] [ERROR] this warning is that reflective operations on this class will incorrectly\r\n [exec] [ERROR] indicate that it is *not* an inner class.\r\n{code}\r\n\r\nThe official solution is using proGuard to keep class.(http://wiki.sharesdk.cn/Android_%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)\r\n\r\n-keep class cn.sharesdk.**{*;}\r\n-keep class com.sina.**{*;}\r\n-keep class **.R$* {*;}\r\n-keep class **.R{*;}\r\n-dontwarn cn.sharesdk.**\r\n-dontwarn **.R$*\r\n-keep class m.framework.**{*;}\r\n\r\n I hope you could test shareSDK before publish proGuard feature. For example, create a module, add \"mframework.jar\" into lib , use \"progarud-projext.txt\" , build and install into a device.\r\n I can not upload attachment, so you should download it by http://sharesdk.cn/media/sdk/ShareSDK_for_Android_2.3.2.zip. Check the sample you can found \"mframework.jar\" and \"progarud-projext.txt\".\r\n\r\n Thank you.\r\n ", "attachment": [], "flagged": false, "summary": "Android: proGuard issue (relates to TIMOB-2782)", "creator": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "osx", "comment": { "comments": [ { "id": "307086", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thoughts?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-30T21:51:42.000+0000", "updated": "2014-05-30T21:51:42.000+0000" }, { "id": "313976", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-14T22:26:16.000+0000", "updated": "2014-07-14T22:26:16.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }