Error in path updating android sdk components - android

A few days ago I decided to change the Windows 10 username, unfortunately I discovered after that that there was a bug that left the user without access on some computers. After I managed to access the computer I created a new user (in addition to the adm). However, Android Studio is downloading to an old user folder (pictured: Ronaldo, which no longer exists). In Android Studio the configuration of the SDK folder is right, it even shows all the previous packages installed, but to update it always tries in the old folder. I have already deleted all known folders (in appdata/local/roaming and others), looked at the windows registry, reinstalled Android Studio and nothing. Always the same problem.
All possible solutions I found were in the sense of access permissions, setting the location of the sdk directory, but nothing like that.
Thank you.
enter image description here

Start Regedit.exe, go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Android Studio and make sure that the SdkPath and UserSettingsPath values are pointing to the new user profile, and not C:\Users\Ronaldo (SdkPath can be empty)
Also worth looking in the file(s) in %userprofile%\.android\studio\installer

Related

Can't access local files in data/data of some phones

I'm having three not rooted phones here. Two of them have Android 10 and one has Android 8.0. On one with Android 10 I just cant access the app files in /data/data directory with the Device File Explorer in Android Studio.
The error I get is:
`run-as: /data has wrong owner: 0/1000, not 1000ยด
I'm just not finding anything useful to fix this.
Since I had to dive into the comments of the original question to solve it for myself, I'll repeat the answer that helped me.
I uninstalled the app, restarted my phone, installed it again with android studio and it worked like a charm after that.
In case you're still looking for an answer.
This most likely happens when your database is created in the past (probably from some code that was a bit off). I advise you to delete the existing database from the device file explorer, make sure your code is right, and re-run the app.
This should create a new database and work.

Android Studio ---- The path is not writable. Please choose a new location

I just installed Android Studio and want to start a new project. But it showed the following error message:
The path XYZ is not writable. Please choose a new location
How should I fix this problem?
The most likely explanation is that the directory and all its files are owned by a different user account on the system. Normally the "Clear Read-Only Access" dialog will fix up read permission problems if it's possible to do so; if it's not (because the files are owned by another user), the dialog will refuse to let you click the OK button.
You can confirm this by using the ls command from the MacOS terminal. Here's an example from a random project of mine.
I had the same issue. Running Android Studio as an administrator worked for me. If this is a possibility for you and you did not do it before, give it a whirl.
I got that error on windows because the initial project location was C:\. But the problem was solved when I made a folder and gave that path:
C:\repo\myApplication
Myself also faced the same problem because , I have changed the permission of that drive from x:\ -> properties -> security . Once I have given full control for my user option(one among 4 options in security) and reopening the Android studio , it didn't post that warning again. So, before you try this option , please verify the security details of drive and make sure that it doesn't affect your further operations regarding security.
I was having this same problem, then I plugged in a flash-drive. It allowed for a place to store the files with a location that did not have white space, was empty, and had enough room to store everything I needed. The flash was the only way I found on my computer to store the files where the path was writable. Hope this helps someone.
You can create that folder (or those folders) yourself, then run the installer again.

Moving the default folders(.AndroidStudio2.X and .gradle ) to D disk:

I want to move Installed AndroidStudio from C: disk to another.
I've successfully(by standard way) .android folder, sdk folder(with it's environment variable) and installation path. However, I cant handle these ones:
c:\users\user\.AndroidStudio2.2
c:\users\user\.gradle
when I move these folders to d:\myfolder and changing every occurrence of c:\users\user\.AndroidStudio2.2 to d:\myfolder\.AndroidStudio2.2 (with TextCrawler), and changing .gradle location in AndroidStudio, it doesnt help.
In C:\user\user there is still created (upon running AStudio) .AndroidStudio2.2 folder. And running Emulator causes errors, because it cant find anything options in C:\users......
plus, I have uncommented and set the path values (in installation/bin/idea.properties) to d:\myfolder, but still no help.
Having dome something similar in the past, I find that moving drives on most software applications is still a big pain. However, I found that creating symlinks was helpful, as the software will "think" it's accessing the files at a location, but in reality they are stored in another.
I successfully did this in the past with Visual Studio and the concept is pretty much the same with Android Studio. You need to create a symlink as follows:
mklink /J "d:\myfolder\.AndroidStudio2.2" "c:\users\user\.AndroidStudio2.2"
Now when Android studio read or write the contents in c:\users\user\.AndroidStudio2.2, it will be in reality going to your d drive, which provided that it's accessible by the c drive, should make it all work.
You should be able to do that with the other folders as well. The benefit of doing it this way is that you're not constrained to the path the file is stored, which means that if you change computers or decide to store everything on the c drive again, you can just remove the symlink.
Hope this helps you.

Error saving system information. Access is denied. Android studio

I'm getting this painful error everytime I try to save my project for the last couple of days.
I've tried running android studio as administrator but I still get the same error.
I've tried to go to that path but the folder .AndroidStudio doesn't appears under User\Lucian\, and I can access the folder through the Address bar, but the folder seems to be empty.
I'd appreciate any directions on where I should be looking.
I've had the same issue since I installed Android Studio several weeks ago.
Today I found out that the 'Android1.3' folder (and some sub-folders) were invisible. Since I turned on the visibility of this folder, I am no longer getting this error. :)
Hope this will help you too.
Go to the path mentioned inside the error message. If you see any hidden folders listed in there change its properties and set its visibility to normal.
For example, C:\Users\Username\.AndroidStudio2.1 was hidden in my system. Removing the hidden properties worked for me.

why app names in DDMS file explorer ends with -1.apk or -2.apk

While going thorough device "/data/app" folder on my rooted Galaxy S2(4.3), i am able to see all application names either ends with -1.apk or -2.apk
Can someone explain this,Why So??, also for new apps installed from google play, names ends with -1.apk or -2.apk
screenshot is as below.
When you have one application installed say - googleplay. And if any updates of the same app comes afterwords, and if you update the app then Android will download the apk and renames it to apk-2.apk and replaces the currently installed (apk-1.apk) application with a newer one (apk-2.apk).
I don't know exactly why Android does that but that is the done with names of apk - apk-1.apk and apk-2.apk.
So It goes this way.
1. You have one application installed say - playmusic then the apk in the "/data/app/" will be playmusic-1.apk
2. One update came in playstore for playmusic. you selected - update. Updates start downloading.
3. After downloading the update "Android OS" will install playmusic and update your app. and if you now see the "/data/app" folder it will be playmusic-2.apk
As mentioned previously I don't know why Android OS does that but Its the mechanism.
Here by playmusic-1.apk and playmusic-2.apk means com.google.playmusic OR whatever the package name is.
You can also try this by yourself.
The answer of WHY
Thanks to #Geobits the mystery is solved. Android does because two apk files with the same name can not exist in the same directory.

Categories

Resources