After installing Android studio under Ubuntu, importing the project and building, the following error appears:
The problem is that licenses are not matched well
There are only two steps to solving the problem:
1. Open file – & gt; Settings
After the settings interface appears, enter appearance – & gt; System Settings -> Android SDK -> SDK Tools
Download Android SDK command line tools (latest) in SDK tools interface
2. After downloading, CMD line tools will be installed in the SDK directory ~/Android/SDK by default. If your directory is different, you need to modify it accordingly
Execute on the command line
yes | sudo ~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager --licenses
The problem is solved. Build can run normally
Note: 1. In some articles, you can directly run the sdkmanager under ~/Android/SDK/tools/bin /, which will report an error
java.lang.NoClassDefFoundError
The reason is that Ubuntu 20.04 installs OpenSDK 11 by default, which will conflict with the JRE that comes with Android Studio.
Uninstalling OpenSDK 11 and installing a lower version of JavaSDK is more troublesome.
Read More:
- ros2 apt-get install error: E: Failed to fetch http://packages.ros.org…
- Ubuntu18.04 Compile A40i SDK Error: misc/create_inode.c:395:18: error: conflicting types for ‘copy_file_range‘
- Ubuntu 20.04 Desktop Install sublime-text Error: “Certificate verification failed”
- Ubuntu18.04 Compile Error: android 7 FAILED [How to Solve]
- Ubuntu Server: How to Install Chrome
- [Solved] Ubuntu pip Install Error: which is not on PATH
- [Solved] Your requirements could not be resolved to an installable set of packages.
- [Solved] Ubuntu16.4Install vcs2016 Error: mount.vboxsf: mounting failed with the error: Invalid argument
- How to Solve labelme Install Error in Ubuntu
- How to Solve Xmind Install Error in Ubuntu System
- Ubuntu: How to deal with the fatal: the remote end hung up unexpected error of GIT clone Android kernel
- [Solved] Ubuntu 20.04 install MATLAB and toolbox permissions Error
- mysqlclient in Ubuntu: How to Solve mysqlclient Install Error
- Windows11 Install Ubuntu Error: WslRegisterDistribution failed with error: 0x800701bc
- [Solved] Ubuntu 18.04 Install opencv3.2.0 and opencv_contrib Error
- [Solved] docker Error: System has not been booted with systemd as init system (PID 1). Can‘t operate. Failed to con
- VScode Error: extension failed XHR Failed (Ubuntu Virtual Machine)
- Ubuntu Run Error: not syncing : VFS: Unable to mount root
- [Solved] Ubuntu Install jdk Error: Error occurred during initialization of VM
- How to Solve Mujoco Install Error in Ubuntu (Pycharm Run Error)