9/24/2023 0 Comments Android sdk versionsMkdir $ANDROID_SDK_ROOT/platform-tools/api/Ĭp $ANDROID_SDK_ROOT/platforms/android-30/data/api-versions.xml $ANDROID_SDK_ROOT/platform-tools/api/ I added a bash task to my CI/CD pipeline where I copy the api-versions.xml file to platform-tools, so it will use that file instead of the resources.Įcho Android sdk location: $ANDROID_SDK_ROOT However, if you, like me, do not control the platform-tools version (since it is managed by AzureDevops in my case), I created a temporary workaround. While Google is solving this issue the appropriate way, the easiest solution is to just downgrade your platform-tools 1 version (as stated in another answer). I raised an issue with google, and they're on it trying to fix it (see the issuetracker link here). But what I noticed is that with larger Android projects, with multiple modules / tasks being built in parallel, some of these streams get closed (hence the Stream Closed exception). The fallback implemented in the SdkUtils class is that it will read the api-versions from the resources (by doing getClass().getClassLoader().getResource("api-versions.xml").openStream() ). The SdkUtils class has a hard reference to the file platform-tools/api/api-versions.xml, but with the latest platform-tools (31.0.3), this file is no longer there. The cause of the issues are related to class SdkUtils (see the source file). This issue only arises in large Android projects, probably when there are multiple modules involved. I have encountered this problem recently as well and I have further investigated the issue, since I couldn't downgrade the platform-tools version (since it occurred on the build server, where I dont control the platform-tools version, its controlled by Microsoft).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |