Related
I want to install android studio preview alongside the stable version.
Download the .zip into ~/Download
/home/zelongg/Downloads/android-studio-ide-171.4444016-linux-3.1-canary-4.zip
sudo unzip android-studio-ide-171.4444016-linux-3.1-canary-4.zip -d
/usr/local/lib/android-studio-preview
sudo mv -v /usr/local/lib/android-studio-preview/android-studio/*
/usr/local/lib/android-studio-preview/
sudo rm -rf /usr/local/lib/android-studio-preview/android-studio/
zelongg#zelongg:/usr/local/lib/android-studio-preview/bin$ ./studio.sh
create a new folder in ~/Android/sdk in case that the newly downloaded
sdk will affect the sdk in mini project.
we can successfully run android studio preview 3.1 canary 4
But we cannot create the second desktop entry somehow.
https://developer.android.com/studio/preview/install-preview.html
The 2 desktop entry means:
What I want is that it should show 2 icons for both Android Studio and Android Studio Preview seperately. But now they share one icon in the left bar.
I followed the instructions below, but it doesn't work.
To make the preview version available in your list of applications, select Tools
Create Desktop Entry from the Android Studio menu bar.
I used Create Desktop Entry from Android Studio Preview, which replaced the ~/.local/share/applications/jetbrains-studio.desktop of my stable version.
Then I copied that file to ~/.local/share/applications/jetbrains-studio-preview.desktop.
The icon was still green, so I downloaded a yellow one and used it in the .desktop file:
I also edited the .desktop file to suffix the name property with Preview
Then I ran the stable version to Create Desktop Entry to restore it.
Unity launcher didn't refresh the preview version icon and name straight away (it's ok after a reboot) and I couldn't figure out which one was which after typing Android Studio in the launcher. So I ran the jetbrains-studio-preview.desktop from its directory (first setting it to be executable), and then I locked it to the launcher. The result:
I tried the accepted answer but had little difficulty since I am not so good with the terminal. so I installed *nautilus Admin. using the command sudo apt-get install nautilus-admin
open Computer-> usr -> share right click applications select Open as Administrator. (for this option u need to install nautilus admin as stated above). right click existing android studio desktop entry select edit as Administrator.
In that file change the StartupWMClass property to jetbrains-studio-preview. that is done. now open your newly installed android studio and create desktop entry. and .... that's it.
just install stable and canary versions from ubuntu software store and their shortcuts are separate by default
I tried to update my Android Studio and got this error. How can I fix this?
I don't have much experience with Android studio and Android app development.
I am using Android Studio 2.3 and Linux.
This worked for me as this post try: Update 2
https://stackoverflow.com/a/42735118/5133603
Update 2:
Solution to emulator package issue!
After digging in the repo's XML for a while I've spotted the issue.
It turns out that the "emulator" package is only in channel 3 (canary) while the "tools" package is in channel 0 (stable) but depends on "emulator". The solution is to force the manager to download the "emulator" package from channel 3:
./sdkmanager --channel=3 emulator
Problem solved!
This is what worked for me:
Download the command line tools, place them in the SDK folder (e.g., on mac: /Users/user/Library/Android/sdk), and then add the bin folder to the PATH.
Install the latest platform: in a terminal, execute sdkmanager "platforms;android-25"
Open Android Studio, and go to the SDK Manager (Appearance and Behavior > System Settings > Android SDK)
Click on "Edit", and then select the sdk folder. Then "Next" > "Next" > "Finish".
I hope this works for you too.
Temporarily change update channel to Canary Channel (Settings > Appearance & Behavior > System Settings > Updates). It works for me (Windows, Android Studio 2.3) I hope, this bug will be fixed in the next version of Android Studio.
My solution using Void Linux (it should fix for other distributions too):
Create a new folder named Sdk in this exact path. Bash example: $ mkdir $HOME/Android/Sdk
cd to this folder, and download the latest SDK command line version. Bash example: $ curl https://dl.google.com/dl/android/studio/ide-zips/2.3.0.8/android-studio-ide-162.3764568-linux.zip
Extract the android-studio-ide-162.3764568-linux.zip. It must be this way: $HOME/Android/Sdk/tools
Launch Android Studio, and then proceed with normal installation.
PS: If you don't have a Android folder on your $HOME, you should create it, and then make the steps 1, 2, and 3, select the $HOME/Android/Sdk Folder in Android Studio → Configure → *SDK Manager → Edit, and proceed to step 4.
Start "Android SDK Manager" from this path:
%Android_home%\SDK Manager.exe
Install all updates from this manager.
P.S. This worked for me.
This is what worked:
Download the command line tools and place them in the SDK folder (on mac:~/Library/Android/sdk).
Install Android studio 2.3 (on mac: /Application/Android Studio.app)
Add path to java in Android Studio (export PATH=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin:$PATH)
Set JAVA_HOME (export JAVA_HOME=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home)
cd to ~/Library/Android/sdk/tools/bin and execute ./sdkmanager "platforms;android-25"
Accept the license - this will install the android-25 platform
Launch Android Studio, and goto the SDK Manager. The SDK Manager will now recognize the SDK path (~/Library/Android/sdk).
Now install the rest of the tools.
This fixed it for me (on a fully-patched Ubuntu 16.04 (Xenial Xerus)).
Disclaimer: I cleaned up everything beforehand:
rm -Rf ~/android-studio/ ~/.AndroidStudio2.2/ ~/.android/ ~/Android/
Then:
wget https://dl.google.com/dl/android/studio/ide-zips/2.3.0.8/android-studio-ide-162.3764568-linux.zip
wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
unzip android-studio-ide-162.3764568-linux.zip -d ~/
mkdir -p ~/Android/sdk
unzip tools_r25.2.3-linux.zip -d ~/Android/sdk
~/Android/sdk/tools/bin/sdkmanager "platforms;android-25"
~/Android/sdk/tools/bin/sdkmanager --channel=3 emulator
~/android-studio/bin/studio.sh
Click "Configure" in the launch window
Select "SDK Manager" in the menu
The list on the right shows "partially installed" for API level 25
Click "Edit" on the right of "Android SDK Location"
You get the warning "an existing Android SDK was detected wizard will only download missing or outdated SDK components"
Click "Next"
Click "Next"
[wait while it installs]
Click "Finish"
I got this problem since hours on my Apple M1 processor.
After a clean delete of Android SDK, this workaround worked for me: https://stackoverflow.com/a/69868954/6809733
Just download the IDE - Intellij IDEA and create a new project, select
Android Project and there download Android SDK, now you can install
android studio again and the sdk is installed. Worked for me!
Just delete the directory C:/Users/%user%/AppData/Local/Android/sdk and rename the other directory in that location from sdk1 to sdk.
Restart Android Studio (close projects) and an assistant will pop-up asking you to update the sdk which will be detected during that process, so a re-download won't be necessary.
Anybody knows how to get around this issue while launching Android Studio?
I saw a Google ticket here, but it was not useful: https://code.google.com/p/android/issues/detail?id=164202
Internal error. Please report to https://code.google.com/p/android/issues
java.lang.AssertionError: Unexpected node Pythonid; nodes=[org.jetbrains.plugins.terminal, org.jetbrains.plugins.javaFX, org.jetbrains.plugins.gradle, org.jetbrains.plugins.github, org.jetbrains.java.decompiler, org.jetbrains.idea.maven, org.jetbrains.android, org.intellij.intelliLang, org.intellij.groovy, org.editorconfig.editorconfigjetbrains, hg4idea, com.millennialmedia.intellibot, com.jivesoftware.robot.intellij.plugin, com.intellij.ui-designer-new, com.intellij.tasks, com.intellij.properties, com.intellij.modules.xml, com.intellij.modules.xdebugger, com.intellij.modules.vcs, com.intellij.modules.python, com.intellij.modules.platform, com.intellij.modules.lang, com.intellij.modules.json, com.intellij.modules.java, com.intellij.modules.androidstudio, com.intellij.modules.all, com.intellij.java-i18n, com.intellij.copyright, com.intellij, com.google.gct.testing, com.google.gct.login, com.google.gct, amailp.intellij.robot, TestNG-J, Subversion, JUnit, Git4Idea, Coverage, CVS]
at com.intellij.util.graph.GraphGenerator.buildOuts(GraphGenerator.java:55)
at com.intellij.util.graph.GraphGenerator.<init>(GraphGenerator.java:36)
at com.intellij.util.graph.GraphGenerator.create(GraphGenerator.java:40)
at com.intellij.ide.plugins.PluginManagerCore.createPluginIdGraph(PluginManagerCore.java:543)
at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1126)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1256)
at com.intellij.openapi.application.impl.ApplicationImpl.loadApplicationComponents(ApplicationImpl.java:348)
at com.intellij.openapi.application.impl.ApplicationImpl.<init>(ApplicationImpl.java:215)
at com.intellij.openapi.application.ex.ApplicationManagerEx.createApplication(ApplicationManagerEx.java:45)
at com.intellij.idea.IdeaApplication.<init>(IdeaApplication.java:112)
at com.intellij.idea.MainImpl$1$1.run(MainImpl.java:47)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
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)
It looks like you have a corrupted installation file - completely uninstall Android Studio and download it again from the website.
Install the newly downloaded version of Android Studio on your system - the one you had previously downloaded is likely corrupt.
Here are the instructions to uninstall Android Studio completely. Note that some files may be located in a different location depending on where you chose to install and the versions you've been using so if something is not in its normal place, please let me know.
Please follow all of the steps below in order.
Run the uninstaller
The first step is to run the uninstaller. Open Control Panel by accessing it from the menu when you right-click the Start Button (This applies for Windows 8 systems). Then, under Programs, select Uninstall a Program. After that, click on Android Studio and press Uninstall. If you have multiple versions, uninstall them as well.
After you have uninstalled Android Studio, it is recommended that you restart before proceeding with the steps below.
Remove the Android Studio files
To delete any remains of Android Studio setting files, in Windows Explorer (The file browser in Windows), type this as the File Path:
C:\Users[YOUR WINDOWS USERNAME]
Replacing [YOUR WINDOWS USERNAME] with the username of your account on Windows. If you don't know your username, navigate to C:\Users and it will list all users on the system.
Here, delete .android, .AndroidStudio and any versions of this directory with versions on the end, .gradle and .m2.
Then, go to
C:\Users\Harry[YOUR WINDOWS USERNAME]\Roaming
and delete the JetBrains directory.
Finally, go to
C:\Program Files
and delete the Android directory.
Remove the SDK
To delete any remains of the SDK, in Windows Explorer, type this in as the File Path:
C:\Users[YOUR WINDOWS USERNAME]\AppData\Local
Here, delete the Android directory.
(Optional) Delete all previous projects
If you want to delete any of your previous projects, the directory where your projects are found is the AndroidStudioProjects directory. It is located in your root user file, C:\Users[YOUR WINDOWS USERNAME].
Hopefully this will now have deleted the Android Studio files and you can now try reinstalling the tools.
If you have any problems doing so, give me a shout :)
1st step please disconnect your internet connection and restart the studio.
If it is not working??? Do the following steps.
Open the folder bin under the directory where you installed your Android Studio.
Find the file idea.properties and open it with Notepad++/UltraEdit/other_edit_tools.
Add disable.android.first.run=true as the final line and save the file.
Restart Android Studio.
Remove lib folder .local/share/Google/AndroidStudio4.1/marketplace
or execute command
rm -rf ~/.local/share/Google/AndroidStudio4.1/marketplace/lib
To recover from this state, you need to remove the "python" folder that you find here:
~./AndroidStudio1.2/config/plugins
(Found at https://code.google.com/p/android/issues/detail?id=164202, worked for me)
I have this problem in android studio in linux OS after install a plugin,i resolved this issue with deleted.AndroidStudio3.2 folder from Home Directory and other way you can go to this directory and delete the plugin that caused it .
Directory : /home/your system's name/.AndroidStudio3.2/config/plugins .
and for windows OS you must go to this Directory :
C:\Users\your system's name.AndroidStudioPreview3.2\config\plugins
Note : this directory is hidden and you must visible befor use it .
I did faced this issue too, where it says to do this in my windows 10:
please report to https://code.google.com/p/android/issues in a windows error message.
It happened when i added some plugins in Android studio in Windows.
It persisted in my machine until i opened my Android Studio as an administrator and then uninstalled the most recent Plugins from File > Settings > Plugins > Installed Plugins.
What went wrong may be I added many plugins and applied all of them at once. May be i should have added one plugin at a time. Like install a plugin > apply that plugin and restart my Android Studio IDE in order to see it's effects.
MacOS
My issue was with a plugin. I tried all sorts of ways of deleting Android folders using terminal. Nothing was working for me until I searched all instances of AndroidStudio in Finder and deleted each of them. After reinstalling everything worked great!
I solved it by removing an incompatile plugin located here: ~\AppData\Roaming\Google\AndroidStudio4.1\plugins.
I deleted the folder "marketplace"
Open the folder bin under the directory where you installed your Android Studio.
Find the file idea.properties and open it with Notepad++/UltraEdit/other_edit_tools.
Add disable.android.first.run=true as the final line and save the file.
Restart Android Studio.
It information helped for me
<<~ ~ ~ Quick Solution for Windows 10, Hope it will help ~ ~ ~>>
Download the latest Android Studio from the official website
Uninstall the existing Android Studio from your computer. NB: Remove Settings Preferences too while uninstalling.
Restart your computer
Install the newly downloaded Android Studio
Delete the old directories which will show when run the Android Studio the first time after installation of the new Android Studio.
NB: Do not remove your SDK files after uninstalling the Android Studio, if you want to save your time in installing the Android Studio.
I have solved this problem, depending on the system you use delete the following files:
Linux:
~/.local/share/Google/AndroidStudioPreview4.1
Windows:
C:\Users\YourUserName\AppData\Roaming\Google\AndroidStudioPreview4.1
MacOS:
~/Library/Application Support/Google/AndroidStudioPreview4.1
Thanks #Jonilson Coelho dos Anjos
For Ubuntu users
go to home
press ctrl+h to show hidden folder .local
now go to .local folder
you will find share folder, go inside share folder
find Google folder and delete it
Open Android Studio
Enjoy !!
delete paid plugin in android studio plugin folder (C:\Users\your_computer_name\AppData\Roaming\Google\AndroidStudio4.1\plugins) and will work correctly. it works for me.
paid plugin should have to activate otherwise it will conflict.
1) Go to
'C:\Users\your-user-name\AppData\Roaming\Google\'
2) Delete folder
'AndroidStudio4.1'
3) Then restart Android studio.
I hope this works for you.
I came with a new solution. Instead of uninstalling Android Studio and removing all related folders and losing your programming state on Android studio, and beside all these wasting your time, you should try this solution first which worked for me:
In my case the problem was the Windows. As it has crashed recently, I figured out the problem could be it, so I decided to restore the windows to the most recent point before Android Studio crashed. But the system restore tool didn't allow me to restore my system at all, and it said I should repair missing or corrupted system files first.
I first used Microsoft System File Checker tool thread to fix the case, and guess what? after restarting the windows 10, all problems gone. No need for uninstalling the Android Studio or removing any plugins or even restoring the windows to an stable state.
Hope this work for you too.
error Android studio
Hi everyone, I have this problem recently and I found the solution by deleting plugins which was corrupted in:
~AppData\Roaming\Google\AndroidStudio2021.1\plugins
-EmmyLua
-Luanalysis
My solution is:
Delete folder C:\Users\[user]\AppData\Roaming\Google\AndroidStudio
Delete folder C:\Users\[user]\AppData\Local\Google\AndroidStudio
Run AndroidStudio.
Note:
Android Studio will be opened like fresh install.
100 % solved
1st go to
C:\Users\your-user-name\AppData\Roaming\Google\
2nd Delete folder
List item
'AndroidStudio4.1'
'AndroidStudio4.1-backup'
DELETE ALL ALL ANDROID STDIO VERSION AND BACKUP RELATED FOLDER
3rd Start again android studio
I am using Android Studio. I can't open Android Device Monitor, Tools > Android > Android Device Monitor. I occurred an error. See the log file at:
C:\Users\Peter Phyo\AppData\Local\Android\sdk\tools\lib\monitor-x86\configuration\1433318221838.log.
Do you have JAVA_HOME in your system environment variables?
JAVA_HOME=C:/Program Files/Java/jdk1.8.0_11
Run android studio as administrator. It will definitely work. No need to reinstall neither android studio nor java.
In my case, after upgrading Android Studio 3.1.2, I tried open C:\Users\yourUserName\AppData\Local\Android\Sdk\tools\monitor, Windows alert "can't find 'lib\monitor-location'. Make sure you typed the name correctly, and then try again". Then I tried open tools\lib\monitor-x86_64\monitor, it works!
I'm on Windows and open Android Studio in Administrative Mode (Run as administrator). Worked for me.
I had the same problem, i solved it using jPortable, if you're using Windows then take this one, there are two versions 32bits and 64bits : https://portableapps.com/apps/utilities/java_portable I changed the location for the extraction from C:\SDK\tools\lib\monitor-x86_64\CommonFiles\Java64 to C:\SDK\tools\lib\monitor-x86_64\jre and it worked.
You need to set path to your ..jre\bin location :
Check in: File > Project Structure your JDK location
add the \bin there , my path is : C:\Program Files\Android\Android Studio\jre\bin
set the path in your Environment Variables, for WINDOWS 7 :
the From the desktop, right click the Computer icon.
Choose Properties from the context menu.
Click the Advanced system settings link.
Click Environment Variables
New System Variable
set the path the following way :
Variable name: Path
Variable value: your path
in my case: Variable value: C:\Program Files\Android\Android Studio\jre\bin
Now you can start the Monitor.exe, my location is here : C:\Users\Admin\AppData\Local\Android\Sdk\tools\lib\monitor-x86_64
for WIN7 32bit start the Monitor.exe from
...Android\Sdk\tools\lib\monitor-x86
Make sure have installed JDK7 or JDK8 depending on your OS bits
If you are using 32bits your install JDK7 or 8 of 32bits
After you install JDK, your JAVA_HOME in your system will be located in
C:\Program Files\Java\jdk1.8.0_40
To check if your JAVA_HOME is set, CLICK Start Menu > Computer > Right Click on Computer > Properties > Control Panel Home will appear, > click Advanced System Settings, under > Advanced Tab click > Environment Variables and check on the > System Variables for > Path if Java [C:\ProgramData\Oracle\Java\javapath;] is there, than you are good to go.
Make sure you have your JAVA_HOME in your system environment variables.
Hope this well help you. If it helped you, please mark it, so that it can the useful to others.
Please ensure you have Android SDK Tools installed.
I had a fresh copy of Android Studio and kept getting this error.
To install:
Tools -> Android -> SDK Manager -> SDK Tools (tab) -> Tick Android SDK Tools x.x.x (if it's not installed) -> Apply
Once installed / finished, try restarting Android Studio then selecting Android Device Monitor from the Tools drop down again.
If you want to see file explorer the please go from this path
View -> Tool Windows -> Device File Explorer.
I hope this path solve your problem.
After running once successfully, Android Studio is getting failed to open.
The error is:
Files in C:\Program Files (x86)\Android\android-studio\system\caches are locked. Android Studio will not be able to start.
Did any one find its solution?
Solved in Windows 7:
Go to folder where android-studio is installed. (e.g. C:\Program Files (x86)\Android\android-studio)
Now go up one folder. (i.e. C:\Program Files (x86)\Android)
Right click on the android-studio folder and go to Properties.
In the Properties window, go to the Security tab.
Click the Edit button.
A new window will open, here you click the Users (your-username-or-your-group-name)
From the list below, check Allow in front of Full control.
Press OK, then again OK.
Now you can use Android Studio easily instead of "Running it As Administrator" every time.
If you are running in Windows 7 / Vista/ etc. then try running Android Studio as administrator. I was having the same problem and this fixed it for me.
I installed it for all users too, and got this same error on second run. Didn't want to reinstall it, and also prefer not to run programs as admin unless necessary, so I just changed a couple file permissions and it runs fine.
I changed the settings on C:\Program Files (x86)\Android\android-studio and let it apply to all sub-folders -- removed Read-Only, and gave localhost/Users group permissions to modify files in this folder. Worked fine afterwards. If you want to be more secure, just give your user permissions to modify those folders.
During the installation, select "install for the current user". Android Studio will be installed in the user's folders, without any authorization issues. Personally I do not like to run program with Administrator power.
if u install for all users than , run as admin will solve it .
Tested in windows 8 also.
SIMPLEST SOLUTION:
Uninstall Android Studio and install it again
I had the same problem and it solved .
Simply go and delete the cache folder from user .AndroidStudio3. . It solved problem