Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SDK path issues with ubuntu-24.04 #409

Merged
merged 12 commits into from
Oct 11, 2024
10 changes: 5 additions & 5 deletions src/sdk-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export async function installAndroidSdk(apiLevel: string, target: string, arch:
const isOnMac = process.platform === 'darwin';
const isArm = process.arch === 'arm64';

if (!isOnMac) {
await exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME}/platform-tools -R`);
await exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME}/cmdline-tools/latest -R`);
await exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME}/build-tools/${BUILD_TOOLS_VERSION} -R`);
}
Comment on lines -22 to -26
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally we needed to change the owner to accept preview SDK license: 49a3d04#diff-b14a072bf3d3c4d7027a549c57f0c1880f60206c24fc202ce4471ab9c0a5881cR23-R28

But this seems no longer required.

// if (!isOnMac) {
// await exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME}/platform-tools -R`);
// await exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME}/cmdline-tools/latest -R`);
// await exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME}/build-tools/${BUILD_TOOLS_VERSION} -R`);
// }

This comment was marked as resolved.


const cmdlineToolsPath = `${process.env.ANDROID_HOME}/cmdline-tools`;
if (!fs.existsSync(cmdlineToolsPath)) {
Expand Down