Gradle Error: Path is not a readable directory for an Android Project saved in OneDrive - android-studio

I tried to use a OneDrive folder to store my Flutter project [Windows 10, Android Studio]. I then made edits to it on another machine [same configurations]. The project compiled fine on the first machine initially and on the second one after the changes. Running it on the first machine again after the changes I get the below error:
Execution failed for task ':app:processDebugResources'.
Path "build/[package]/intermediaries/compiled_local_resources" is not a readable directory.
I've tried a number of solutions mentioned in similar, though not equivalent issues:
Updating Android Studio
Running Android Studio as Administrator
Removing the [package] from my dependencies (this resulted in a
different package being identified in the error message).
Pressing File -> Invalidate Caches / Restart...
Commenting out
"org.gradle.jvmargs=-Xmx1536M" in gradle.properties
Doing:
cd android
gradlew clean
None of this worked.

I had the same problem today:
Path "build/[package]/intermediaries/compiled_local_resources/debug/out" is not a readable directory.
I was able to fix this issue by deleting the .gradle and rebuilding the project.

All I did was create the (empty) directory that it was looking for and it built fine afterward.
mkdir -p compiled_local_resources/debug/out

I had the same issue, came out of no where and it really shouldn't make the build fail... but all I did was create the (empty) directory that it was looking for and it built fine afterwards.

In the end the only thing that worked for me was pushing the project up to a Git remote and cloning it from there into another (local) directory.
[not sure this counts as a solution but nothing else worked for me after a long agonising search so hopefully it helps someone]

I know the OP had Windows, but if it helps anyone else in the future:
On Mac OS I discovered (the hard way) that Android Studio and Flutter do not play nice with being stored in iCloud! I noticed that some files weren't available locally and that's what was causing the problem for me. I moved my project out of iCloud (forcing it to download the missing files forever) and then it was fine.

Deleting the android/.gradle folder worked for me.

+1 also to the #1 answer (Vadow). As I do not have 50 points yet was not able to add this as a comment, so will have to post separately.
Like the OP, I have two machines - and got into trouble (Synology Drive). Vadow's solution worked for me, but I also had to do:
Flutter Clean
Flutter Pub Get
on the terminal and from within the project directory to get things follow back up and running.
Thank you Stackoverflow, and thank you Vadow!

Related

Android Studio Won't Open After Installing Plugins Supporting .csv Files

I had imported a .csv file in Android Studio, which after opening suggested me to install plugins supporting *.csv files. After the installation, I have not been able to load the IDE. I get the splash-screen but the program is stuck.
I have tried uninstalling/reinstalling the IDE, but the issue persists. Some solutions on stackoverflow suggest finding the CSV plugin folder and then deleting it, however, I cannot deduce which folder that is. I have also compared the plugins folder with a vanilla installation of AS on another computer.
Today I had same problem. I solved it with removing plugins from folders listed bellow. To be honest I am livid that something like this can happen.
General solution:
I went to this pc and searched "csv". then I went throught list of all results and found that android studio plugins are stored in following folders:
C:\Users\${user}\AppData\Local\Google\AndroidStudio${version}\plugins
C:\Users\${user}\AppData\Roaming\Google\AndroidStudio${version}\plugins
First I removed just CSV folder, but that wasn't enough so I deleted also RanbowCSV and all folders which were created at time of first occurance of the problem. I think that should be enough, but I was angry so I deleted everything from those folders.
I also went to folder:
C:\Program Files\Android\Android Studio\plugins
There I searched "csv" and deleted found file "csv.py".
Hope that helps to anybody who gets baited to installing csv plugin as did I.

Cant remove node_modules file with .staging folder inside

I am facing an issue whilst trying to get rid of a folder inside of my node_modules folder. I click delete nothing happens, somethings preventing it from being removed. I have looked everywhere and can't seem to find a solution.
Any help would greatly be appreciated.
I had the same issue on my linux machine. Managed to delete the node_modules/.staging folder by .... removing my hard drive and deleting it on another pc. No node process was running on either machines. In the 4 years working with node I spent more time trying to fix it.
Solution that i found "I had Antivirus installed on my pc ,which was unknowingly using the files from node_modules folder".
I uninstalled the antivirus or u can change permission setting from antivirus setting option (depends on which antivirus u have).Now i am able to delete node_modules folder.

Source Tree doesn't launch after installation

After successful download of source tree on windows 10 , the application doesn't seem to launch, Any help appreciated , Thanks
This solved the issue for me.
Cause
The most likely reason for this error is that the user.config file for SourceTree has been corrupted.
You can confirm this by locating the file in this location: C:\Users\<User>\AppData\Local\Atlassian\SourceTree.exe_<random_string>\<version_number>
If this is the cause, when you open the file, it will be full of <NULL> values.
Resolution
If the user.config file is indeed corrupted, you may delete it.
It will be regenerated the next time you start SourceTree, and the application should start normally.
Without providing the SourceTree errorlog nobody will really be able to tell you how to resolve this issue.
The Sourcetree errorlog can be found at C:\Users\<username>\AppData\Local\Atlassian\SourceTree\sourcetree.log on windows.
Or by opening the Console application (Applications >> Utilities >> Console) and searching for entries related to "SourceTree", on mac.
The 2 most common fixes however are:
Re-install Source tree.
Delete the C:\Users\%user%\AppData\Local\Atlassian folder
Sourcetree.log
Uninstall .Net 4.5 Or your current .Net version
Install SourceTree 2.4.7.0 (Sourcetree installation will install .Net Again for you).
Note: I tried Atlassian recommendations such as deleting \Users{UserId}\AppData\Local\SourceTree as well as \Users{UserId}\AppData\Local\Atlassian. Also tried Deleting entries from Windows Registry none of those things helped.

no clean option in android studio

I found no option for clean project in build in android studio. what is reason for that? or is there different way to clean the project in android studio
Make sure you are looking a the correct directory. I also thought clean was missing when I looked under the root directory. Turns out it see example is located under the :app directory.
Open the Gradle side panel on the right. Select app->Tasks->build->clean
This problem can occur when you import the root directory rather than the project file. If you imported the file, make sure you select the correct file:

sublime text 3 sidebar autoupdating not working

I was wondering if anyone could tell me how to make it so that sublime text 3 automatically updates the sidebar when i add a new folder/file to the current project in finder (osx).
Right now, I have to manually go to Project -> Refresh Folders
My user preferences are probably not the issue as they are very basic:
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"font_size": 18,
"tab_size": 2,
"translate_tabs_to_spaces": true
}
If anyone could help that would be great as I have tried googling, searching for an answer to this but havent found anything that works.
Thanks in advance.
I recently began experiencing this issue and it turned out to be DropBox related. Once I removed DropBox and restarted my machine the folder refreshing began working as before. Also, DropBox was affecting several other apps, specifically SourceTree and Transmit as well as Sublime Text 3.
I had this same issue. You could always bind the folder refresh to a hotkey. While this is not a complete fix for auto-updating, it still saves you from a more lengthy manual refresh. I believe this is how Dreamweaver works as well.
I had the same issue with ST3 (OSX 10.9.2). It was something wrong with the root folder of my projects. I created new folder Code1, moved all of my projects there, removed old Code folder and renamed new Code1 to Code. This bit of magic returned things back to normal.
Open the console and see if there are any errors. It logs when there are changes to the filesystem.
I've had this problem when I used disks that where mounted with samba. My best guess is that this has something to do with the OS or filesystem not triggering the correct events for sublime to realize that there's new stuff in the folders.
I'm guessing that the disk on which the project you're working on belongs to a mounted disk, that might have a different filesystem. Try moving the project and see if that helps. If that is the case maybe you ought to see over which flags and stuff you're using when mounting the disk on which the project was originally stored.
How you would go about fixing that however I have no clue about since I don't have any experience with OSX.
This could be the result of an error with the plugin SidebarEnhancements, as was the case for me. Using package control I removed the plugin. I couldn't package install the plugin back as it would not show up on the list of available plugins. So instead I followed this github issue in the repo and got it cloned into the correct directory.
Another side note, in sublime I clicked "Sublime Text" -> "Preferences" -> "Browse Packages". to open up the correct location to clone the repo in finder. If you click on the folder icon in the top bar of the resulting finder window you can actually drag this into iTerm2 so that you are in the proper location before running the git clone command included below.
git clone https://github.com/titoBouzout/SideBarEnhancements.git "SideBarEnhancements"
cd "SideBarEnhancements"
Finally, quit ST3 and reopen worked for me. Hope this helps.
I'm using Windows, so not sure if my solution is relevant to the exact question, but since I found this on Google, I figured it might just help somebody. My problem was specifically with the SideBarEnhancements plugin.
The dumb solution (try this first):
Close Sublime Text, go to the Packages directory (in Windows that's in %HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Sublime Text 3 (Win+R, paste that path, enter);
Rename SideBarEnhancements to something else and then back to its original name;
Reopen Sublime Text.
The nice solution (for Git Bash on Windows):
IF the dumb solution has not worked, there is no point in following on.
However, if it worked, you can automate the process.
Open %HOMEDRIVE%%HOMEPATH%\.bashrc, or in other words: User\.bashrc (create the file if you don't have it);
Paste the following at the end of the file (preferably on a new line):
touchme() {
echo 'Killing Sublime Text process..';
taskkill -IM "sublime_text.exe";
cd ~/AppData/Roaming/Sublime\ Text\ 3/Packages;
touch SideBarEnhancements;
echo 'SideBarEnhancements folder touched;';
echo 'Returning to original directory..';
cd -;
echo 'Reopening Sublime Text..';
"/L/Program Files/Sublime Text 3/sublime_text.exe"&
}
Change the path to your sublime_text.exe (last line of the function);
If Git Bash is opened, execute source ~/.bashrc and go to 6;
If Git Bash is not opened, open it and go to 6;
Execute touchme without any brackets;
In case you use the touchme command for something else, or simply don't like it, feel completely free to rename the function (I just found it the easiest to write and remember :P).
I guess the code above can be adapted for Unix systems, too, with some small tweaks.
I had this problem after reinstalling Sublime Text 2 and symlinking.
A workaround I found was binding the refresh_folder_list command with cmd+s, since that's usually when we see the sidebar updating.
For this to work you'll need to install run_multiple_commands plugin.
Then you'll have to update your User Keymap telling it to refresh folder list every time you save. The syntax is fairly simple.
I also ran across Synced Side Bar after fixing the issue. I am not sure if this is a solution but sounds promising.
Hope this helps.
I don't have a solution but a theory on why this is happening. I noticed as well recently that it stopped refreshing. I've also noticed that when I use the finder to open folders or use the 'open' within any program, the OS would just show an empty directory when I know there are files in it. I would then have to select a few different folders to get it to recognize that I'm asking it to show me the contents in the folder. It's almost like that function is asleep and I have to nudge it awake.
It seems Mavericks is using some strong sleep agent and turning off any functions behind the scene that's not needed and perhaps it's also affecting the sidebar refresh.
Same issue for me with ST2 on OSX 10.7.5. I started by opening Finder to the folder where I had the issue and navigated to that folder in terminal as well. Then:
Create a blank file and observe if Finder refreshed.
echo "" > test.txt
If Finder didn't refresh, navigate to the parent folder in both Finder and terminal. Repeat step 1.
If Finder did refresh, rename the child folder you came from to anything and then back to the original name.
mv folder_name new_folder_name
mv new_folder_name folder_name
Auto refresh in Finder started working again as well as the Sublime sidebar for that folder and all child folders.
I don't have an explanation as to why this issue started. Prior to this solution, I attempted the following trying to figure it out. I don't know if these steps were necessary in resolving this issue.
I removed .DS_Store files from the folders with this issue.
Remove the Finder preferences file and restart Finder. As described here.
rm ~/Library/Preferences/com.apple.finder.plist ; killall Finder
Exit Dropbox
Thanks to #peresleguine for the suggestion of renaming the folder.
I had the same issue with folders and files not showing up. No matter what folders I added it wouldn't work, refreshing folders didn't work, if I restarted Sublime, I would then see the folders I added but none of it's contents. I ended up going to File -> Close Window and then File -> New Window, after that when I added folders to the new window, it started working again. Seems like it's a corruption in the project file somehow. Anyways hope this helps someone.
Mac OSX Mavericks
Sublime 3 Build 3059
If you're using OS X with python version higher than 2.7.1, try downgrading python to 2.7. This fixed multiple issues for me:
brew update
brew install pyenv
echo 'if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi' >> ~/.bashrc
source ~/.bashrc
pyenv install 2.7
pyenv global 2.7
# now restart ST3
One of the sub-folders of my project contained a symlink to the project itself, making a loop. As soon as I've removed it and re-opened the project, the problem went away. However, that symlink was necessary for my project to function, so I created a simple .sublime-project file:
{
"folders": [{
"path": "/",
"folder_exclude_patterns": ["symlink-or-one-of-its-parents"]
}]
}
The exclusion pattern made Sublime ignore the loop, and the sidebar went back to normal right away. Just note that folder_exclude_patterns accepts folder names, not paths. That means that it might exclude something you didn't want to exclude (i.e. if you write lib it'll exclude all lib folders in your project, regardless of where they are). Hope this helps somebody.
I had this issue after symlinking my project files to another partition on the hard disk. I fixed it by editing the path for each project from Project > Edit Project to the new location.
A bit late to the conversation, but I resolved this by turning off DropBox's Finder integration. There is a known issue with Yosemite 10.10.x
https://www.dropbox.com/help/7144
Click on the dropbox icon in your tool bar, click the gear and then open preferences. Un-check Enable Finder integration. Then restart your computer.
Hope that helps.
I just fixed this issue and I think the reason is because I use dropbox to sync my ST3 settings.
Somedays before I restarted with 'reopen windows when logging back in', and found sublime opened earlier than dropbox finished its initialisation, which caused some settings couldn't load properly.
The result was when I used subl . to open project, I found the side bar not working properly. At the first beginning, I just closed ST3 windows and re-run subl, but it didn't work.
Finally I quitted ST3 (cmd+q), and made sure dropbox was properly loaded, then subl again. This time it worked.
Hope it helps.

Resources