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

Android studio cannot launch #41

Closed diksub26 closed 2 years ago

diksub26 commented 5 years ago

my android studio cannot launch after increse heap memory.. how to fix ?

popey commented 5 years ago

Thanks for the issue @dikisubagja - sorry to hear it's not working. Can you please provide some more information? So I can try and reproduce it here. What did you change exactly, from what to what, and what happens when you snap run android-studio? Any error messages?

diksub26 commented 5 years ago

yes, this the error messages

Invalid maximum heap size: -Xmx7800m # <------ increase this to most of your RAM Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

popey commented 5 years ago

Did you put that in $HOME/.AndroidStudio3.2/config/studio64.vmoptions? I tried a number of options and it works fine here. I even over-allocated, way more RAM than I have and it still launches fine. Maybe comment out the changed lines in that file and see if it's some other issue? Then maybe add the line back in to confirm it really is that line causing the issue? How much RAM and Swap does your system have?

diksub26 commented 5 years ago

thanks now can run.. after I delete the comment "<---- increase this to most of your RAM '. but now, i have now error message. this the error message

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0

(java:2597): Gdk-CRITICAL **: 18:57:30.109: IA__gdk_x11_display_get_xdisplay: assertion 'GDK_IS_DISPLAY (display)' failed Gtk-Message: 18:57:30.220: Failed to load module "canberra-gtk-module" Jan 14, 2019 6:57:49 PM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. How to fix it ?

my ram 8gb and my swap 16gb

om26er commented 5 years ago

I think you can ignore those issues, those warnings are independent of this snap package.