snapcrafters / android-studio

A community-maintained package to easily install Android Studio on Linux
https://developer.android.com/studio/index.html
47 stars 16 forks source link

License not accepted on first new project #92

Closed antodelly closed 2 years ago

antodelly commented 2 years ago

Hi, i'm new in linux. I need to install android studio in my pc to study, and, searching on google, i found this snap way to install that. How my download and installation compleate, i tried to create my first project: an easy "Hello World", but, how i clicked on "Build" button, the app allert me with 1 problem, and the message is this:" License for package Android SDK Build-Tools 30.0.2 not accepted. Failed to install the following Android SDK packages as some licences have not been accepted." How i can resolve ?

om26er commented 2 years ago

This is not related to the Snap. I have seen that issue and multiple other people I work with have seen that as well in the past

om26er commented 2 years ago

Please look around Stackoverflow, people have solutions for this.

beta-tester commented 2 years ago

i have the same issue on ubuntu 21.10.

i could not run ~/Android/Sdk/tools/bin/sdkmanager --licenses because it throws java.lang.NoClassDefFoundError exception.

the only thing that i could do is in Android Studio to remove the installed SDK:

and reinstall it again, then i got the chance to accept the license.

why not asking to accept the license during the installation of the snap packages? if it is not possible, isn't it better to not preinstall any SDK in the snap package?

lucyllewy commented 2 years ago

@beta-tester , hi, we don't preinstall any SDKs in the Snap Package. The path you mention is inside your home folder, which means it is not part of the Snap Package. Are you sure that this is not a remnant of a previous installed version, such as via an alternative distribution than the Snap Store?

beta-tester commented 2 years ago

this it the very first time i installed AndroidStudio on a computer at all.

i installed it via Ubuntu's Software App. it is mention that it is a snap package, maintained by "Snapcrafters" ("snapcraft.io") and at Snapcrafters there is a link to this location here at github for issue reports.

that's the reason why i thought it is the right place here to report my issue.

and i should mention that i have nearly no knowledge about how snaps works.

after installation i started AndroidStudio and created a "New Project" by following (Build your first app). then i tried to run it and got that error message above about the license i have to accept. the folowing folders were newly created in my home folder (as far as i could see):

Android
AndroidStudioProjects
snap/adroid-studio
.android
.config/Google/AndroidStudio2020.3
.grandle
.java

is that snap package i installed via Ubuntu Software app not yours?

EDIT: during installation, i think i got asked where i want to have my AndroidStudioProjecs folder. and i choosed my home folder.

om26er commented 2 years ago

Just to clarify: This project is just for packaging of Android Studio for Linux. It packs the Android Studio that Google releases as-is.

More importantly, what you are seeing is NOT a bug, you really have to accept the licenses to use the SDKs. Please use Android Studios' SDK manager for that.

HTH