{ "id": "160573", "key": "TIMOB-23458", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-07-19T19:05:32.000+0000", "created": "2016-05-27T13:16:19.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-09-30T23:10: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": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10207", "name": "Tooling" } ], "description": "Scenario:\r\n\r\nBuild an app for android (with ti build or appc run) to device. Switch git branches or take other actions that result in having tiapp.xml set a lower app version number. Try to build again, and you get the following failure:\r\n\r\n{code}\r\n[INFO] Installing app on device: SM-G900V\r\n[ERROR] Failed to install apk on \"7d4c9760\"\r\n[ERROR] Error: INSTALL_FAILED_VERSION_DOWNGRADE\r\n{code}\r\n\r\nInstead of forcing developers to update the tiapp (which adds complexity to git workflows, like when you're reviewing a co-worker's PR), the build/run command should either automatically include the {{-d}} (allow downgrade) on the {{adb install}} command it execs, or it should have its own flag to enable that adb option.", "attachment": [], "flagged": false, "summary": "Build command should include -d option or support its own flag for Android builds", "creator": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 681, "state": "closed", "name": "2016 Sprint 15 Tooling", "startDate": "2016-07-16T00:19:13.868Z", "endDate": "2016-07-30T00:19:00.000Z", "completeDate": "2016-08-01T04:41:26.446Z", "originBoardId": 199 } ], "comment": { "comments": [ { "id": "387047", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, \r\n\r\nI tried to test your issue as you described. First I run an app with \"appc run -p android -T device\", App runs perfectly in device. Later I changed SDK version to a lower version and-and try running as \"appc run -p android -T device\". The app run again successfully.\r\n\r\nPlease, explain if I am missing something.\r\n\r\nRegards,\r\nSharif.\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-05-27T19:28:11.000+0000", "updated": "2016-05-27T19:28:11.000+0000" }, { "id": "387048", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "Sorry, not the SDK version, the *app* version. \r\n\r\nFor example, you create a branch off of master while the app version is 1.5. Shak makes a few changes and now master is at 1.6. He has the app installed on his phone. You submit your PR and he goes to review it. He builds the app and when it gets to the point where the build tools try to install it on his phone, they will fail with the INSTALL_FAILED_VERSION_DOWNGRADE message above.", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-27T20:07:46.000+0000", "updated": "2016-05-27T20:07:46.000+0000" }, { "id": "391020", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/8142", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-07-19T17:47:45.000+0000", "updated": "2016-07-19T17:47:45.000+0000" }, { "id": "396760", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nThe apk installs & does not give {{INSTALL_FAILED_VERSION_DOWNGRADE}} error.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.8.0.201609191928\r\nTi SDK : 6.0.0.v20160919141738\r\nTi CLI : 5.0.9\r\nAlloy : 1.9.1\r\nMAC El Capitan : 10.11.6\r\nAppc NPM : 4.2.8-6\r\nAppc CLI : 6.0.0-46\r\nNode: 4.4.4\r\nNexus 6 - Android 6.0.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-21T00:48:12.000+0000", "updated": "2016-09-21T00:48:12.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }