errors using Subversion in Android Studio 2.2 - android-studio

I recently upgraded to Android Studio 2.2 and attempted to use it on an existing project that had been checked out of a Subversion 1.9.3 repository. After the upgrade, multiple different Subversion-related operations that used to work fine are failing with various errors. Some things still work, others are met with a variety of errors. For details on some of the errors, see this link:android studio 2.2 issue 223358
Is anyone else seeing errors with Subversion operations (commits, etc) after upgrading to Android Studio 2.2? Has anyone upgraded and can still successfully use Subversion functions from within Studio 2.2? Even better, has anyone else seen problems and found a fix :-) ?
Thanks in advance for any info.

I have all this problems too. How i solved it:
In Android Studio Settings - Subversion setting - tab General I have switch off checkbox "use command line client" (Also switch off "Enable interactive mode" checkbox). After that svn browsing begin to work fine. Than I import Project to Studio from svn server and in new imported project all svn features works fine.

Related

could not find extension implementation class org.jetbrains.kotlin.idea.scripting.gradle.roots.GradleBuildRootsManager

My project works and builds successfully on my Mac but I cloned from github and although Android Studio appears to work normally, the project wouldn't build. I setup this project using Kotlin DSL.
Gradle sync failed: could not find extension implementation class org.jetbrains.kotlin.idea.scripting.gradle.roots.GradleBuildRoot
Tried invalidate cache, removed all .gitignore rules but it's still the same.
Any ideas?
I had the same issue (Note : Running Linux/Ubuntu 20.04 LTS and Android Studio 4.1.1).
Things I tried that did NOT work and error persisted :
Invalidate Caches / Restart
Reboot
Nuking the .gradle and .m2 folders
Android Studio re-install
Downgrade kotlin gradle plugin from 1.4.21 to 1.4.10
What did work :
Moving the project to a different folder/location on disk and open Android Studio
As soon as I moved the project back to the original location I would start getting the same error. This lead me to believe it was some sort of caching issue, separate from the caches "invalidated".
Solution :
Android Studio / Intellij creates a hidden folder called :
On Linux :
AS : ~/.cache/Google/AndroidStudioX.X
IJ : ~/.cache/Jetbrains/IntelliJIdea2020.X
On Mac :
AS : ~/Library/Caches/Google/AndroidStudioX.X
IJ : ~/Library/Caches/Jetbrains/IntelliJIdea2020.X
On Windows:
AS : %HOME%\AppData\Local\Google\AndroidStudioX.X
IJ : %HOME%\AppData\Local\Jetbrains\IntelliJIdea2020.X
Inside this folder are other various folders, however I removed the relevant workspace file (workspace/[project name].[hashed value].xml) after which problem went away when opening the project again, from its original location.
So it appears that "Invalidate Caches / Restart" does not "Invalidate" all caches!
I hope this resolves you problem!
Update
As this answer has had quite a few upvotes it would appear that this might be a ongoing bug with Intellij. If anyone has this problem, before resolving with the suggested solution consider checking there isn't an open issue on the bug tracker and submitting a new issue : https://youtrack.jetbrains.com/issues
Feel free to edit this update with issue if one is opened.
Update 2
Issue opened by #GeniusRUS :
https://youtrack.jetbrains.com/issue/KT-44937
For Mac users delete the following file:
~/Library/Caches/Google/AndroidStudio4.1/workspace/<your_project_name>.58dfbe93.xml
PS: Thanls #Mark Keen for solution.
basically i deleted .idea folder and then invalidate and restart ... error goes away and built successfull.
This probably isn't the "correct" solution, however, it worked for me. I had to download a newer (Canary) Version of Android Studio to get this error message to go away and to finally build my Android project once again. I found this YouTrack JetBrains issue where people also suggested reverting to previous, known working, versions of Android Studio to get their projects to build again.
This is a SUPER frustrating issue and I hope that one of the approaches resolves your build issues for you!
Here are the Android Studio Versions Download page for convenience.
After moving projects and files around I had also the honor to enjoy this error in Android Studio 4.1.1 (under Windows 10). Unfortunately, none of the above solutions worked for me but they helped me to narrow down the issue.
So, I found that there is a folder with workspaces under:
%HOME%\AppData\Local\Google\AndroidStudio4.1\workspace\
There are a couple of *.xml files named like the android projects. I deleted the one that didn't work.
Then switched back to Android Studio and used the Files > Invalidate Caches / Restart... feature. Android Studio restarted and the problem was fixed.
Bonus: How I found the workspace folder?
I used the Procmon.exe from Sysinternals where I filtered by the Process Name = studio64.exe. I then used the elephant-with-the-arrow button (Sync Project with Gradle Files) in Android Studio. At the end of the recording there was the workspace folder that Android Studio used just before Gradle failed.
I added a "problem" ticket to YouTrack, where I described my case in detail.
The support agent said the issue has already been fixed in the IDEA 2021.1 platform.
And also gave recommendations for this case
Link to issue
https://youtrack.jetbrains.com/issue/KT-44937
I fixed the issue by changing the root project directory name. You can try that.

Can't Install Plugins in Android Studio

I'm trying to get Flutter/Dart plugins set up in Android Studio but I'm having a ton of trouble.
The Plugin Browser doesn't work at all. I tried with different internet connections and with my firewall totally off but still got nothing. Also tried reinstalling fully to no avail. I added a repository manually but it doesn't connect to it. I can go to that link in my web browser without any issue.
I tried installing the Dart/Flutter plugins from the disk too and it throws a different error
Plugin 'Dart' is incompatible with this installation
I've also tried enabling "auto-detect proxy settings" in the HTML Proxy settings and this didn't help either.
I'm running the latest version of Android Studio (3.5.3) on a Windows 10 Home machine. I tried to downgrade to 3.1.2 and that didn't help either.
Not sure what to do to get this working - any help would be awesome!
The issue was resolved by reinstalling again. Not sure what fixed it sepcifically since I already had tried reinstalling, but it worked this time around. Thanks all!
I recommend you to go through the link https://medium.com/flutterpub/installing-flutter-in-android-studio-ec135911ceea. It is just a simple wizard to setup flutter in Android Studio.

Error related to resources_ap after upgrading to Android Studio 3.4

I upgraded Android Studio 3.4 today. I am no longer able to run the the app. I have cleaned the project, restarted Android studio many times. I have also invalidated cache to no avail.
I am getting the following error when installing the app:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexWithInstantRunSlicesApkForDebug'.
> java.lang.RuntimeException: java.io.FileNotFoundException: E:\...\app\build\intermediates\instant_run_split_apk_resources\debug\instantRunSplitApkResourcesDebug\out\slice_1\resources_ap
Could anyone offer a tip on how to remedy this?
Edit:
I have two projects with different behaviors related to this issue:
Project A initially had this issue. I disabled Instant Run per the answer, the problem was solved. I enabled Instant Run later, and Project A is still working fine.
Project B also had this problem that has been remedied by turning of Instant Run. However, its problem will occur as soon as Instant Run is turned on. I do not what difference between these two projects results in this. One suspect is library C project. Library C is a part of Project A (i.e. its source code, resources are in Project A). However, Project B uses the aar of Library C as a module.
Issue should be fixed in Android Studio 3.4.2.
EDIT: Here is my old answer on how to fix it in Android Studio 3.4.0 and 3.4.1:
Using Gradle 5.4 instead of 5.1.1 helped me with this error.
Update gradle-wrapper.properties file with:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
Please note I haven't tested older Gradle versions, so it's possible even (for example) 5.2 version will work. You can see all Gradle releases here - https://gradle.org/releases/
Switching off Instant Run as a workaround (File/Settings/Instant Run) seems to eliminate the problem.
According to OP it is possible to turn Instant Run back on without the problem recurring for some projects.
There is no need to turn off Instant Run.
Just delete the '.gradle' directory in the project and build directory inside the 'app' module.
Perform Clean Project and Rebuild Project.
This will solve the issue.
This is caused by "instant run" feature in android studio 3.4 , you can disable it by:
Open the Settings or Preferences dialog. Navigate to Build, Execution, Deployment > Instant Run. Uncheck the box next to Enable Instant Run
Enjoy...!
Go to your project folder and move everything from ...\app\build\ to some other folder outside project. (to clear build folder with back up)
In my case clearing the build folder solved the probem, till then i was disableing the instant Run option for every new install.
I tried both "Gradle 5.4" and "Switching off Instant Run" solutions but they didnt work until I turned on "Wait for Debugger" option until "Developer Options" in my phone (Huawei Mate 10). I have confirmed that this is only working with "Instant Run" off as well.
This problem happened to me on Windows. I solved it by disabling instant run.
I also have the same Android Studio version on Linux and it works fine with instant run enabled.
This is fixed in 3.4.2. Just update to the latest version of Studio. https://androidstudio.googleblog.com/2019/07/android-studio-342-available.html
This same error happened when I updated to Android Studio 3.4.2, I updated the tools-build-gradle to 3.4.2 and the problem disappear.
Switching off Instant Run as a workaround (File/Settings/Instant Run) seems to eliminate the problem.

Downloading latest Android Studio

My current Android Studio installation (linux-64bit) is showing a pop-up saying there is a new Version of Android Studio 2.
I am unable to download the current stable of Android Studio.
The download-link (on big green button) reffers to the Terms and Conditions. If i Accept and klick the button (which is showing no text, which is also strange) it redirects me to the index page again.
Here is the index page: http://developer.android.com/sdk/index.html
Have they withdrawn the release or something? Does anybody know a direct-link?
Thank you for any help on it
You need to have a little patience and try to check for update from time to time until you'll be able to update Android Studio from within the IDE. I encountered the same issues as you but after a while it worked well.
My advise is to wait with the upgrading to 2.0 and stick with your 1.5 version because a lot of people here have problems with Android Studio 2.0 (for now it is kind of buggy, maybe later Google will fixed some issues...).
As an example of my problems with Android Studio 2.0 I've posted recently, check this: After upgrading to Android Studio 2.0, I cannot change the screen orientation in the Android emulator, but of course it is your decision to upgrade or not :) .
P.S. I'm a linux user too.
As this is entirely a new version, you will not be able to update (or upgrade) from within the app.
You will have to download the installer and install at the same location replacing your Android studio 1.5
I did the same thing and is working for me.
Regards
Vivek

Does Android studio need internet connection to build project

I am using Android studio version 0.4.2 and gradle version 1.9. I have successfully installed Studio and have created multiple projects. Today when I launched Studio without internet connection,
I got this error message:
"Gradle project sync failed. Basic functionality (e.g. editing,
debugging) will not work properly" and the Event Log window shows
"Failed to refresh Gradle project < Project Name >. Connection timed
out: connect. If you are behind an HTTP proxy, please configure the
proxy settings either in IDE or Gradle."
I need to know if internet connection is mandatory for building projects using gradle.
I think gradle checks for latest version on internet and throws Connection time out error. If so, is there any workaround to disable that.
Currently Android Studio's Gradle implementation requires a fast stable network connection. For whatever reason, the developers have decided to force this requirement on users at this time. There is a setting that you should be able to use to utilize a local gradle installation, but it doesn't hold. The developers know about both the network requirement and the broken switch, but are currently prioritizing other functionality. They may remove that requirement in the 1.0 or post 1.0 time frame.
[see: https://plus.google.com/u/0/115692564989237473252/posts/LGSbniYqj3Q ]
Gradle's offline mode, isn't. It should be properly named cached mode. All that switch does is tell gradle to not try to go online and instead utilize cached copies of the various networked resources. Unfortunately that assumes that you have had (and will have again) a network connection, preferably a fast stable one. Using Android Studio (last version tested 0.5.9) with a slow/unstable network results in watching Android Studio process Gradle ( and Maven ) processes usually for 2-5 minutes, sometimes for 10 minutes or more. Also at seemingly random times when coding the IDE will lock up and the cause usually involves one or more Gradle processes that have spun up.
As a comparison, using IntelliJ IDEA 13.1 Community edition (the IDE that Android Studio is based on) I compared a default "Hello Android" IDE generated program using the Android Gradle wizard (substantially similar to the only one in Android Studio) and the Ant based Android wizard. The results were as expected. The gradle based project experienced the same painful lock up and lag that projects in Android Studio exhibited. The ant based Android project was near instantaneous. No appreciable delay once the project was created and opened. Coding caused no random lockups. Testing was done on a Windows 8.1 update1 Pro machine with a dual Athlon x2 processor, 6GB RAM, and a 6Mb/0.75Mb DSL connection. I believe that last part is most likely the issue.
Unfortunately until Android Studio removes the network requirement I feel it will be unusable to a large number of developers. That's a shame because otherwise it looks to be a marked improvement over the existing Eclipse based development environment.
For me, I had to check and then uncheck the box in
Preferences->Gradle->Offline work.
Then I got back online.
You can download the gradle distribution locally and build the project again.
To do this, edit your gradle-wrapper.properties under gradle-> wrapper in your Android project.
Edit the
distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip
to
distributionUrl=file:///home/foo/downloads/gradle-2.2.1-all.zip
So just download the file from here as mentioned in your gradle-wrapper.properties.
There's an offline mode preference in Preferences > Compiler > Gradle. If you already have your dependencies downloaded, this will generally work for you.
In Android studio version 1.5.1 I could solve this error by following steps :
1) Go to file -> Settings -> HTTP Proxy -> & select Auto detect proxy settings.
2) After that you may get Dialog to accept or reject certificate
3) Select Accept.
That's it.

Resources