{"action":"created","issue":{"url":"https://api.github.com/repos/JakeWharton/sdk-manager-plugin/issues/70","labels_url":"https://api.github.com/repos/JakeWharton/sdk-manager-plugin/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/JakeWharton/sdk-manager-plugin/issues/70/comments","events_url":"https://api.github.com/repos/JakeWharton/sdk-manager-plugin/issues/70/events","html_url":"https://github.com/JakeWharton/sdk-manager-plugin/issues/70","id":63687536,"number":70,"title":"Downloading target 22 doesn't work","user":{"login":"jakubkrolewski","id":7403073,"avatar_url":"https://avatars.githubusercontent.com/u/7403073?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubkrolewski","html_url":"https://github.com/jakubkrolewski","followers_url":"https://api.github.com/users/jakubkrolewski/followers","following_url":"https://api.github.com/users/jakubkrolewski/following{/other_user}","gists_url":"https://api.github.com/users/jakubkrolewski/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubkrolewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubkrolewski/subscriptions","organizations_url":"https://api.github.com/users/jakubkrolewski/orgs","repos_url":"https://api.github.com/users/jakubkrolewski/repos","events_url":"https://api.github.com/users/jakubkrolewski/events{/privacy}","received_events_url":"https://api.github.com/users/jakubkrolewski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-23T10:20:57Z","updated_at":"2015-03-23T10:33:35Z","closed_at":null,"body":"```\r\n$ ./gradlew assembleDebug\r\nPicked up JAVA_TOOL_OPTIONS: -Xmx2048m -XX:MaxPermSize=1024m -Xms512m -Dfile.encoding=UTF-8\r\nGradle 2.2.1\r\nCompilation API android-22 missing. Downloading...\r\n\r\nFAILURE: Build failed with an exception.\r\n\r\n* Where:\r\nBuild file 'C:\\Users\\(...)\\build.gradle' line: 122\r\n\r\n* What went wrong:\r\nA problem occurred evaluating project ':root'.\r\n> Failed to apply plugin [id 'android-unit-test']\r\n   > failed to find target android-22 : C:\\opt\\android-sdk-windows\r\n\r\n* Try:\r\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\r\n\r\nBUILD FAILED\r\n```\r\nWhat's interesting, the SDK was actually downloaded correctly, so after running the build again nothing was missing any more and the build succeed."},"comment":{"url":"https://api.github.com/repos/JakeWharton/sdk-manager-plugin/issues/comments/84938006","html_url":"https://github.com/JakeWharton/sdk-manager-plugin/issues/70#issuecomment-84938006","issue_url":"https://api.github.com/repos/JakeWharton/sdk-manager-plugin/issues/70","id":84938006,"user":{"login":"plastiv","id":179550,"avatar_url":"https://avatars.githubusercontent.com/u/179550?v=3","gravatar_id":"","url":"https://api.github.com/users/plastiv","html_url":"https://github.com/plastiv","followers_url":"https://api.github.com/users/plastiv/followers","following_url":"https://api.github.com/users/plastiv/following{/other_user}","gists_url":"https://api.github.com/users/plastiv/gists{/gist_id}","starred_url":"https://api.github.com/users/plastiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plastiv/subscriptions","organizations_url":"https://api.github.com/users/plastiv/orgs","repos_url":"https://api.github.com/users/plastiv/repos","events_url":"https://api.github.com/users/plastiv/events{/privacy}","received_events_url":"https://api.github.com/users/plastiv/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T10:33:35Z","updated_at":"2015-03-23T10:33:35Z","body":"That's a known issue already. (https://github.com/JakeWharton/sdk-manager-plugin/issues/10, https://github.com/JakeWharton/sdk-manager-plugin/issues/47)\r\n\r\nThis is due to the way gradle resolves dependency scope before any task is ever run and don't update it later.\r\n\r\nUse next workaround:\r\n\r\n```\r\n./gradlew clean --continue\r\n./gradlew clean assemble\r\n```"}}