You are not logged in.
I've installed Android Studio, but whenever it loads I am prompted with the below message. Entering /opt/android-sdk doesn't work... Any ideas?
http://i.imgur.com/mYkKqbC.png
Mod Edit: Changed large in-line image to a link. Our policy
Last edited by tony5429 (2013-07-04 13:41:40)
Offline
I ran into that same issue; I don't know why it doesn't like the one installed there. However, it did work once I pointed it to one downloaded into my home directory (by Eclipse).
Offline
sounds like a permissions problem to me.
Offline
Interesting. This is what I've currently got...
[karam@nikolai ~]$ ls -l /opt | grep android-sdk
drwxr-xr-x 5 root root 4096 May 22 22:04 android-sdkOffline
have you tried running it from the terminal to see what kind of output you get? If you check out the arch wiki for android, it makes a couple of recommendations for changing the owner of /opt/android-sdk to your user or a new group, of which your user is a member of. I'm not on my pc now, but I'm pretty sure my user is the owner of my android-sdk. I will check in a minute.
EDIT: Yes, as I suspected, my user owns /opt/android-sdk. Some people might prefer the group approach, though.
https://wiki.archlinux.org/index.php/Android
Last edited by cris9288 (2013-06-26 17:41:26)
Offline
Thanks, cris9288. After chowning, Android Studio now fully loads and then prompts for the SDK directory, and then accepts it each time I provide /opt/android-sdk. However, upon clicking "New Project," I am met with the error "Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later." As seen in the output below, I am in fact using version 22 of the SDK, as well as the latest version of Android Studio.... Any ideas?
[karam@nikolai ~]$ pacman -Q jre7-openjdk
jre7-openjdk 7.u40_2.4.0-1
[karam@nikolai ~]$ pacman -Q android-sdk
android-sdk r22.0.1-1
[karam@nikolai ~]$ pacman -Q android-studio
android-studio 0.1.7-1
[karam@nikolai ~]$ ls -l /opt | grep android-sdk
drwxr-xr-x 6 karam root 4096 Jun 26 20:14 android-sdk
[karam@nikolai ~]$ android-studio
OpenJDK Runtime Environment (IcedTea 2.4.0) (ArchLinux build 7.u40_2.4.0-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.0-b40, mixed mode)
OpenJDK Runtime Environment (IcedTea 2.4.0) (ArchLinux build 7.u40_2.4.0-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.0-b40, mixed mode)
WARNING: You are launching the IDE using OpenJDK Java runtime.
ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES!
SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS!
NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed
please validate either STUDIO_JDK, JDK_HOME, or JAVA_HOME environment variable points to valid Oracle (Sun) JDK installation.
See http://ow.ly/6TuKQ for more info on switching default JDK.
Press Enter to continue.
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.
[ 14332] ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.ComponentEvent[COMPONENT_RESIZED (0,0 800x640)] on dialog1
java.lang.NullPointerException
at com.intellij.openapi.ui.DialogWrapper$2.componentResized(DialogWrapper.java:188)
at java.awt.AWTEventMulticaster.componentResized(AWTEventMulticaster.java:160)
at java.awt.Component.processComponentEvent(Component.java:6331)
at java.awt.Component.processEvent(Component.java:6285)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Window.processEvent(Window.java:2022)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:701)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:526)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:349)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
at java.awt.Dialog.show(Dialog.java:1082)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:771)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:446)
at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1488)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1463)
at com.intellij.openapi.ui.Messages.showDialog(Messages.java:194)
at com.intellij.openapi.ui.Messages.showDialog(Messages.java:206)
at com.intellij.openapi.ui.Messages.showDialog(Messages.java:216)
at com.intellij.openapi.ui.Messages.showErrorDialog(Messages.java:469)
at com.android.tools.idea.wizard.NewProjectWizard.init(NewProjectWizard.java:65)
at com.android.tools.idea.wizard.NewProjectWizard.<init>(NewProjectWizard.java:56)
at com.android.tools.idea.actions.AndroidNewProjectAction.actionPerformed(AndroidNewProjectAction.java:34)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162)
at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:169)
at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:132)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:310)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:701)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:522)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:349)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
[ 14346] ERROR - com.intellij.ide.IdeEventQueue - Android Studio (I/O Preview) AI-130.721168 Build #AI-130.721168
[ 14347] ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.7.0_40
[ 14347] ERROR - com.intellij.ide.IdeEventQueue - VM: OpenJDK 64-Bit Server VM
[ 14347] ERROR - com.intellij.ide.IdeEventQueue - Vendor: Oracle Corporation
[ 14347] ERROR - com.intellij.ide.IdeEventQueue - OS: Linux
[ 14347] ERROR - com.intellij.ide.IdeEventQueue - Last Action: WelcomeScreen.CreateNewProject
[ 16173] ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(513,196),absolute(800,295),button=1,modifiers=Button1,clickCount=1] on frame0
java.lang.IllegalStateException: <html>Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later.<br>You can configure your SDK via <b>Configure | Project Defaults | Project Structure | SDKs</b></html>
at com.android.tools.idea.wizard.NewProjectWizard.init(NewProjectWizard.java:66)
at com.android.tools.idea.wizard.NewProjectWizard.<init>(NewProjectWizard.java:56)
at com.android.tools.idea.actions.AndroidNewProjectAction.actionPerformed(AndroidNewProjectAction.java:34)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162)
at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:169)
at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:132)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:310)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:701)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:522)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:349)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
[ 16185] ERROR - com.intellij.ide.IdeEventQueue - Android Studio (I/O Preview) AI-130.721168 Build #AI-130.721168
[ 16186] ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.7.0_40
[ 16186] ERROR - com.intellij.ide.IdeEventQueue - VM: OpenJDK 64-Bit Server VM
[ 16190] ERROR - com.intellij.ide.IdeEventQueue - Vendor: Oracle Corporation
[ 16190] ERROR - com.intellij.ide.IdeEventQueue - OS: Linux
[ 16190] ERROR - com.intellij.ide.IdeEventQueue - Last Action: WelcomeScreen.CreateNewProject
[ 18671] WARN - api.vfs.impl.local.FileWatcher - Watcher terminated with exit code 0
[karam@nikolai ~]$ Offline
I just recorded a video of the error: www.youtube.com/watch?v=xy7Ano4Ibyk
Anyone have any ideas what's going on here?
Offline
I think part of the android-sdk package is a file in /etc/profile.d that is used to update your $PATH. I use only the android-sdk-platform-tools, as I have no need for the rest, but that appends /opt/android-sdk/platform-tools to my $PATH.
Can you check to make sure you your PATH variable is set up this way? If it is not, source /etc/profile, which sould in turn source all files in /etc/profile.d and add this... or if you want you can first check to make sure that I am correct in my remembering the addition to /etc/profile.d. You can check this with "pacman -Ql android-sdk | grep profile.d"
Offline
Thanks, WonderWoofy. It looks like you're right, but I do already have android-sdk in my path...
[karam@nikolai ~]$ pacman -Ql android-sdk | grep profile.d
android-sdk /etc/profile.d/
android-sdk /etc/profile.d/android-sdk.csh
android-sdk /etc/profile.d/android-sdk.sh
[karam@nikolai ~]$ echo $PATH
/usr/lib/qt4/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/tools:/opt/opencascade/bin:/usr/bin/vendor_perl:/usr/bin/core_perl
[karam@nikolai ~]$Offline
Okay... well unfortunately, I have never used this software and that was every idea I have on the topic. ![]()
Offline
I completely uninstalled all Android packages, downloaded the latest ones, and reinstalled paying closer attention to the wiki page. Everything works now! I did have to chown the directory still. Previously I was missing the build-tools package, and the platform-specific zip file.
Offline
Ah, you never got it set up then... That is something that I actually did when I installed the stuff. I did have the full android-sdk for a while thinking it might be of use. But I realized after a while that Android didn't pique my interest in the same way as tinkering with Arch Linux does. So all needed were adb and fastboot in order to unlock the bootloader of my Nexus 7.
I'm glad you got this working!
Offline
I hope this message will help for all of you who got the same errors on SDK window saying (failed to create directory blablabla...).
For Arch beginners and all'ye who are lazy- use yourt-gui (from AUR, really nice to quickly done this kind of job, its like installing AUR applications from normal official repositories. Quickly!)
This is what I have done.
1. android-studio, android sdk, java, adb, fastboot. make sure you uninstall all of them. I also deleted all dependencies (also using yaourt-gui).
2. If you are using jdk8-openjdk - uninstall it, remove all dependencies, just get rid of it! then install "jdk" from AUR (its oracle's jdk). If you install JDK from oracle you won't get any warning messages. If you are already using oracle jdk - skip this step.
3. not sure if necesarry to install all of them, I was using yourt-gui and I just pasted all those applications and installed them all, some of them was from AUR:
android-sdk android-sdk-platform-tools android-sdk-build-tools android-platform android-tools android studio
4. reboot pc
5. open terminal, run this command AS ROOT (and change to your name):
chown -R <your_normal_user_name>:wheel /opt/android-sdk/
this command sets your normal user as an owner of /opt/android-sdk so you will be able to edit files as normal user at /opt/android-sdk/ directory without root permissions, that means you will be able to use android sdk as normal user.
6. open Android-studio. at the settings put there android-sdk directory path. it shouldn't say any errors about invalid sdk etc...
7. open SDK and install what you need. All I did at the beginning was just clicked "install/update" without changing any selections
8. In sdk manager, select and install: extras --> android support repository. (it might be installed so it won't be necesarry, but I had error and found a solution here http://stackoverflow.com/questions/1962 … pportappco ... nevermind)
good luck.
P.S. I won't be suprised if I get here an angry admin's post complaining about revived from stoneage thread or not clear information etc. I just wrote what I have done so far to get it successfully working. Maybe some users will find it useful if they stuck!
Last edited by erkexzcx (2014-10-20 20:17:35)
Allergic to admins&moderators. They scare me.
Offline
Hey super, thanks! I just ran into the problem yesterday.
Send the admins to me ...
[Update]
I got it also running by doing the following
1. Login as root
2. Set path to SDK in Android Studio
3. Update and install all required Android versions
4. Log off
5. Login as desired user and start android-studio
Works as expected
Last edited by sandstorm (2014-10-21 18:26:56)
Offline
Hey super, thanks! I just ran into the problem yesterday.
Send the admins to me ...[Update]
I got it also running by doing the following
1. Login as root
2. Set path to SDK in Android Studio
3. Update and install all required Android versions
4. Log off
5. Login as desired user and start android-studioWorks as expected
Yeah, its another way of doing it. You need to modify from android-studio (or lets be clear - android sdk app) the folder which is /opt/android-sdk/ and we don't have permissions for that as regular users! Strange experience, isn't it? Android sdk should install itself on user's home directory where it can be easily configured as regular user, not root...
Allergic to admins&moderators. They scare me.
Offline
Root installs the software. So installing it to a specific user's home directory is challenging.
But, the chown -R <your_normal_user_name>:wheel /opt/android-sdk/ could be added to the PKGBUILD of Android Studio.
What do you think?
Offline
Root installs the software. So installing it to a specific user's home directory is challenging.
But, the chown -R <your_normal_user_name>:wheel /opt/android-sdk/ could be added to the PKGBUILD of Android Studio.What do you think?
I am not a developer, but I think it is impossible - installing package as root will return value of $USER as "root", not your username. We need to contact developers who take care of it. I am not even sure which packages install it's stuff to /opt/android-sdk. BTW for now, I will go to arch wiki about Android and I will update description. I will mention it there ![]()
Would be great to hear admins opinion about it and further steps.
Allergic to admins&moderators. They scare me.
Offline