Fix URI -> Path conversion on Windows.
Paths.get(URI) handles the "jar:file:" prefix nicely on all platforms, so there is no need to substring it.
Fixes
Part 1 of this fix: []
RELNOTES: Fixed Android build issues with aapt2 on Windows. See the [GitHub issue](https://github.com/bazelbuild/bazel/issues/9102) for more information.
@@ -226,7 +226,7 @@ public class ProtoApk implements Closeable {
/** The apk as path. */
public Path asApkPath() {
- return Paths.get(uri.toString().substring("jar:".length() + 1));
+ return Paths.get(uri);
}
/** Thrown when errors occur during proto apk processing. */
