{"action":"created","issue":{"url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1758","repository_url":"https://api.github.com/repos/xamarin/xamarin-android","labels_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1758/labels{/name}","comments_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1758/comments","events_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1758/events","html_url":"https://github.com/xamarin/xamarin-android/pull/1758","id":327925378,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNjAwNzc2","number":1758,"title":"[aapt2] fix $(AndroidUseAapt2), missing aapt2 is now an error","user":{"login":"jonathanpeppers","id":840039,"node_id":"MDQ6VXNlcjg0MDAzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/840039?v=4","gravatar_id":"","url":"https://api.github.com/users/jonathanpeppers","html_url":"https://github.com/jonathanpeppers","followers_url":"https://api.github.com/users/jonathanpeppers/followers","following_url":"https://api.github.com/users/jonathanpeppers/following{/other_user}","gists_url":"https://api.github.com/users/jonathanpeppers/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanpeppers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanpeppers/subscriptions","organizations_url":"https://api.github.com/users/jonathanpeppers/orgs","repos_url":"https://api.github.com/users/jonathanpeppers/repos","events_url":"https://api.github.com/users/jonathanpeppers/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanpeppers/received_events","type":"User","site_admin":false},"labels":[{"id":445371980,"node_id":"MDU6TGFiZWw0NDUzNzE5ODA=","url":"https://api.github.com/repos/xamarin/xamarin-android/labels/do-not-merge","name":"do-not-merge","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-30T22:43:34Z","updated_at":"2018-05-30T23:22:03Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/1758","html_url":"https://github.com/xamarin/xamarin-android/pull/1758","diff_url":"https://github.com/xamarin/xamarin-android/pull/1758.diff","patch_url":"https://github.com/xamarin/xamarin-android/pull/1758.patch"},"body":"We have `$(AndroidUseAapt2)` defaulted to `False` so that developers\r\nhave to opt-in to using the new feature. Unfortunately, enabling the\r\nproperty did not work at all.\r\n\r\nThere was a typo in the `<ResolveSdksTask />` invocation:\r\n\r\n    AndroidUseAapt2=\"$(Aapt2Version)\"\r\n\r\nAdditionally, the `Aapt2Version` property wasn't being passed in either.\r\n\r\nI also promoted the following warnings to errors:\r\n- XA0111 - unknown aapt2 version\r\n- XA0112 - aapt2 is missing\r\n\r\nSo if I rename `aapt2.exe`, the following command:\r\n\r\n    bin\\Debug\\bin\\xabuild samples\\HelloWorld\\HelloWorld.csproj /p:AndroidUseAapt2=True\r\n\r\nResults with the error:\r\n\r\n    error XA0112: `aapt2` is not installed. Please check it is installed correctly."},"comment":{"url":"https://api.github.com/repos/xamarin/xamarin-android/issues/comments/393350559","html_url":"https://github.com/xamarin/xamarin-android/pull/1758#issuecomment-393350559","issue_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/1758","id":393350559,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzM1MDU1OQ==","user":{"login":"jonathanpeppers","id":840039,"node_id":"MDQ6VXNlcjg0MDAzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/840039?v=4","gravatar_id":"","url":"https://api.github.com/users/jonathanpeppers","html_url":"https://github.com/jonathanpeppers","followers_url":"https://api.github.com/users/jonathanpeppers/followers","following_url":"https://api.github.com/users/jonathanpeppers/following{/other_user}","gists_url":"https://api.github.com/users/jonathanpeppers/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanpeppers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanpeppers/subscriptions","organizations_url":"https://api.github.com/users/jonathanpeppers/orgs","repos_url":"https://api.github.com/users/jonathanpeppers/repos","events_url":"https://api.github.com/users/jonathanpeppers/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanpeppers/received_events","type":"User","site_admin":false},"created_at":"2018-05-30T23:22:03Z","updated_at":"2018-05-30T23:22:03Z","author_association":"CONTRIBUTOR","body":"After thinking about it, I think the behavior we already had was better. Promoting these warnings to errors seems worse.\r\n\r\nLet me rework this to just include the `$(Aapt2Version)` fix and improve the error code docs a little."}}
{"actor":{"display_login":"jonathanpeppers"}}