Why does Android Studio have an internal error after installing - java

I just downloaded and installed Android Studio. I've tried running it, but there's some internal error. I've tried uninstalling, deleting the JDK, and reinstalling, but I'm still having this same problem. I also tried to download the new installer and install it again but same problem happened.
Here's the error:
java.util.concurrent.CompletionExecption:org.picocontainer.PicoRegistrationException:Keyio.flutter.settings.FlutterSettings duplicated
at java.base/util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at...(many more errors)
at...(many more errors)

First of all, I will like to know which OS you are on. But try this;
If you have anti-virus, you want to disable it till after a successful installation because some anti-virus delete some files at installation time because those files are read as treat to your PC.

If you are on MacOS ,then try deleting the marketplace directory which contains plugins.
rm -Rf ~/Library/Application\ Support/AndroidStudio2020.3.1/marketplace/
or
~/Library/Application Support/Google/AndroidStudio202.3.1/plugins
There can be Android Studio under Application Support but that is not the correct one.
If you use Windows then , try the following ways:-
Changing these lines of code
Open the folder where you installed Android Studio:
ex: C:Program FilesAndroidAndroid Studiobin
Find and edit idea.properties. You can edit this with use notepad++ or
any similar application that allows text editing.
Add this line as the final in the file:
disable.android.first.run=true
Now run Android Studio again.
Opening in Offline Mode
Close Android Studio Turn off Internet connection and be sure of it.
Start Android Studio. You will see a popup box with Cancel option in it.
Then Click cancel.
Reinstalling JAVA, PYTHON
Downloading new package of ANDRIOD STUDIO and installing it again after deleting all the previous files
Adding bin directory to the enviornment variables
JAVA PYTHON JRE-AndriodStudio
Deleting the user plugins that we have in Andriod Studio. [But as its my first time of installation, I am not having them]
Even tried restarting my system
Closing all other instances running via java, to ensure it not disturbing that particular port number
But no programmes were running in the process that took the use of java
Windows Credits:- https://ittone.ma/ittone/start-failed-fresh-installation-android-studio/

Related

Internal HTTP server and gradle refresh error on Android Studio

I was using AS perfectly without any issues. When I imported a project downloaded via github. And after resolving some build issues I managed to ran the program but it caused problem with AS and I had close it forcefully. When I restarted my AS it pop up firstly with this error.
cannot start internal http server. git integration, javascript debugger and liveedit may operate with errors. please check your firewall settings and restart android studio
Then I googled and found some solutions of which I tried these:
Disable Antivirus or firewall.
Run network command netsh winsock reset
Remove all gradle related files and restart.
Remove all android related files(SDK, .android folder etc) and reinstall android with no previous settings.
All of these didn't work and another problem came up.
Gradle 'My Aplication' project refresh failed - Error:Protocol family unavailable
For this problem I added following line in my environment variables
_JAVA_OPTIONS = -Djava.net.preferIPv4Stack=true
but this didn't resolved my issue. So I again reinstalled AS from beginning.
Now I am having two issues
Gradle 'My Aplication' project refresh failed. <br>
Error:Could not connect to server [ff117fd1-1e60-4433-87c8-b03c2c38eba0 port:55537, addresses:[/127.0.0.1]]. Tried addresses: [/127.0.0.1].
And other issue is
cannot start internal http server. git integration, javascript debugger and liveedit may operate with errors. please check your firewall settings and restart android studio
I have searched everywhere but couldn't find any solution for these two issues.
Windows 10 OS
Android Version : Android Studio 2.3.3
Build #AI-162.4069837
Wamp Server is installed and working
Please help me with this issue. Thanks in advance.
Actually I found the solution to my problem. I don't know what exactly worked for me but after following these steps my problem was resolved.
Uninstall Android Studio(save the user settings if you want to).
Uninstall other programs which uses server port on the system.(like wamp)
Disable/uninstall antivirus on the system.
Delete all related folders (.gradle,.android,.AndroidStudioProjects etc from user's folder Android folder from local folder in app data) and restart system.
Install android studio and make sure firewall/antivirus is disabled.
Import settings if you want but don't import settings for gradle, httpserver, internal server, git, javascript debugger and others which were causing problem earlier.
Install the SDK and Emulator and other SDK tools.
Enjoy

android.bat not opening Android SDK manager

Yes, this question has been asked before. But the solutions on the internet are not working so that's why I am asking it here. I'm guessing the solutions aren't working because I am using newer versions but I'm not sure.
Bit of Background: So I am making a small game in Unity. I have to test it on Android so I can check if there are any problems or not. So I check around the internet on how I may be able to do that. Turns out, I need to change the build settings to android and I also need JDK installed on my computer along with Android SDK Manager so I download them both. I did not install the Android Studio but just the Command Line Tools because many tutorials say that I do not actually need the whole Android Studio because I'm gonna be making the app in Unity not in Android Studio. So I do that. I install JDK and Extract the command line tools.
I think the JDK installed fine because after installing JDK, I opened Internet Explorer (No, I don't use IE, I use Chrome but I opened it just for fun). And a little notification showed up at the bottom which basically said that I could now run Java on the browser so that's why I don't think there are any problems with the JDK installation.
Problem: I extracted Command Line tools of Android Studio and found that there was only a tools/ folder in it. I opened it and clicked on android.bat but the Android SDK manager doesn't work. A CMD screen just flashes for a moment but then nothing happens.
Solution I have Tried:
Change set java_exe to:
set java_exe="C:\Program Files\Java\jre7\bin\java.exe"
and delete the line:
call libjava_find.bat
But I can't find set java_exe code anywhere in the file. The file doesn't have it. How am I supposed to change it?
Alright, so I figured it out but I was still unable to pinpoint the problem. Here is what I did:
Installed a fresh copy of Windows 10. Note: It is highly unlikely that this will solve the problem. But where I live, it is very common to just install a fresh copy of windows whenever you get a problem. I really don't think you need to do this.
Follow all the instructions from: https://www.youtube.com/watch?v=yLFBu-VlBIw
If you get the following error:
Error building Player: CommandInvokationFailure: Unable to list target platforms. Then use this fix: not finding android sdk (Unity)
These steps solved the problem for me and I was able to run it properly.

failed to load properties file for project Android studio already installed

I have already installed android studio and is working great. Then I downloaded Eclipse Neon tar.gz file from the official website and ran the installer. When it prompted me to choose which installation i gave Android development and the installation process finished.
Soon after it finished, the ide opened in a given workspace. Then the error came as no ddms found. I closed eclipse and opened android studio to check if its working fine or not. Its working fine and the last project loaded without any error. S
So I closed it and opened eclipse again. But before closing it i opened android emulator from android studio. I left it there so that i can use it for eclipse.
When i opened Eclipse again, it told me that no avd found. I closed it and stared creating a new Android application project. From File->New->Android Application Project In the last screen when i clicked finish, Errors came in the problems tab and a error report was generated by the eclipse.
The problem is that no matter how many times i click finish the wizard wont close. I can only cancel the wizard.
This is the error came failed to load properties file for project for my project
I searched it and found many links. One solution was to delete debug keystore,
Other was
eclipse Failed to load properties file for project
Other was to Deleting the existing ADT Bundle and Extract the new ADT Bundle.
My worry is the I already have android studio installed in my system. I that going to be a problem?
And also when i checked for paths of SDK location its correct. Both Android Studio and Eclipse are sharing the same.
So what should i do. Pleeeez help

Error when running in the new Android studio

I developed few months ago an android application that is working well. I wanted then to add some updates on the code. I updated android studio and now that I want to run my code with the new Android studio i have this error :
Error:Could not read entry ':app:packageDebug' from cache taskArtifacts.bin (/Users/sofiane/Desktop/AndroidStudioProjects/Changes/.gradle/2.10/taskArtifacts/taskArtifacts.bin).
>com.android.build.gradle.tasks.PackageApplication$DexPackagingPolicy
Can any one help me to fix this, i can't even understand why ??
Thanx in advance.
1st Solution of this problem is
clean out the gradle system caches,
Gradle cache locates at
On Windows: %USER_HOME%.gradle/caches
On Mac/Unix: $HOME/.gradle/caches/
Or 2nd solution for this problem is
Just delete ProjectDirectory/.gradle/taskArtifacts.bin file and restart your Android Studio.
As #Sebastian Engel told,
Removing the project-local .gradle folder will do it. It will be recreated during the next build and all will be fine again.
Gradle cache located at
On Windows: %USER_HOME%.gradle/caches
On Mac/Unix: $HOME/.gradle/caches/
You can browse to these directory and manually delete it or run
rm -rf $HOME/.gradle/caches/
on Unix or OS X system.
Refer: Gradle Build Failed in Android Studio (Cannot read testArtifacts.bin from cache)

Mac os after 10.9.3 Android Studio is not working

I have a new Macbook pro. My computer update OSX 10.9.3 in yesterday.
When I try run a new Android Project, I get this gradle error.
Error:Could not initialize class java.lang.UNIXProcess
When I sync project gradle some time get this error.
Error:Cause: posix_spawn is not a supported process launch mechanism on this platform.
Please help.
Thanx.
Right Click on Android Studio from your install location
Click Show Contents
Open Contents/bin/studio.vmoptions with any text editor
Add -Duser.language=en to the end of the file.
Save
Run Android Stuio.
It will work well...

Categories