Android Studio pointing at wrong user directory - java

On my machine I have two user directories, one local on C:\Users\Username\, and another on a network path \\networkName\Home\Username.
Although Android studio was stored in C:\Program Files, and the SDK folder was set to C:\Users\Username\AppData\Local\Android\sdk, Android Studio itself insists on using the network home, saving all local application data there, and as there's no space on this directory, causing Android Studio to throw constant No enough space on the disk exceptions, or file not found.
Is there an environment variable, or registry key I need to change to get it to point at the right folder?

To change the Environment variable follow the steps by #tacticurv:
1.) Open Windows explorer and right click on computer and select properties. In the control panel home that opened select advanced system settings in the left pane. Then select environment variables under advanced tab in the system properties window.
2.) Add a new user variable with name 'ANDROID_AVD_HOME' and value as path to /.android/avd/
3.) Similarly set GRADLE environment variables. This link might help - http://www.gradle.org/installation
4.) Start Android Studio - it will ask if you want to import config file. Give location to /.AndroidStudio/config

Related

where does exactly getFilesDir() method address?

I have some files you can say a trained model that I need to get their path in my activity class.
I want to use getFilesDir()but it return "data/user/0/com.example.abc/files/".
I just don't know which folder or directory I have to paste my files exactly in order to be in this path so that these file can be get through getFilesDir().
This is the folder on your device
You can find it by opening "Device File Explorer" (this is a collapsed tab in the bottom right of your Android Studio - written vertically on the right edge, bottom)
There you open the folders data/data/com.yourpackage.name/files
Upload your files to this folder and your app can pick them up.
Hope this helps.
Use this way only to test things. For a production scenario you need to package your files in the project, like in the raw or assets folders of your app's resources, so they are contained in the .apk or .aab app bundle.
You can not access this folder via Windows Explorer. The Device must be in developer mode and adb must be running, so you can only access it through android studio or adb command shell. Keep that in mind.

I can not see with db Questoid SQLite Browser

i am using eclipse for android programing and now i need to view SQLite database in the emulator.
I followed these step:
Download .jar file
Place the plugin .jar file in your Eclipse plugins folder (e.g. /usr/lib/eclipse/plugins)
Restart Eclipse
Start up an Android Emulator w/ Debugging in Eclipse
Switch to the DDMS Perspective in Eclipse
Go to the 'File Explorer' tab to locate your device's database file
Navigate to: e.g. 'data -> data -> com.myproject -> databases -> myproject
Now when i try to Open the database file in Questoid i can't select it!
(see screen shot)
same advice?
From your screen shot there, the database does not have a "." (read: period) in the file name & extension area.
Improper: mydatabaseDB
Proper: mydatabase.db
Once the database shows the proper extension (and is a proper SQLite database), then Questoid will (I use the plugin all the time in Eclipse (Juno version)) then show the "active" button (not disabled like in your screen shot). When looking for latest database entries (what was just added into the database), I then click once again on the toolbar icon as you show there, in the upper right of the screen. I then go to the Browse Data tab for that view, then choose the table from the database I want to view the fields from.
I hope this helps.
Happy coding...
I had the same problem with "sqlitemanager": only .db-Database files are accepted.
This is the solution:
Download this Questoid SqLiteBrowser: http://www.java2s.com/Code/JarDownload/com.questoid/com.questoid.sqlitebrowser_1.2.0.jar.zip
Unzip and put it into eclipse/dropins (not Plugins)
Try following these steps:
1) Close Eclipe
2) Remove the .jar from /usr/lib/eclipse/plugins.
3) Place the .jar in /eclipse/dropins and let Eclipse try to install it for you.
4) Start Eclipse.
you can always use sqlitebrowser externally . You will have to pull your databse everytime from ddms though .
The file has to end with .db extension, so the answer is to name your database as this sqlite browser expects it to be.
Another way of fixing it is to find a year old version that does not have this constraint.
Please use the extension ".db" in lowercase, please don't try with these extensions .SLQLITE, .BD, .DB, .SQL, or similar or without extensions.
Regards,

Saving document to a particular folder on a different server

I have 2 applications on different servers (Server A and Server B) and would like to save the documents to folder on server A. on server A i can just save it to folder E:\XXX\XXX folder. but using application on Server what would be the folder structure \ipaddress\XXX\XXXX this did not work, can any one help me on that. We are using Java application on Jboss AS
If you are using Windows, just Map the folder on Server A as a drive, lets say S: in the explorer.
To do so, just open up an explorer and go to My Computer. If you are using Windows 7 (or Server 2008), then there is a button that says "Map Network Drive". Select the drive letter you want to assign to it, in our case S and then enter the path "\'Server-IP-here'\'folder-to-share'\".
On Windows XP, you can do the same thing when you go to the "Tools" menu on My Computer.
Make sure that the folder you want to share is available on the network/you shared it.
Now you can access the folder from your Java Application with S:\

Change Java temporary internet files storage location

I am trying to change the storage location of Java Web Start. I read that the location is changeable through the java control panel. I got there and I can see the path of my "temporary internet files" but the "change" button is gray. Why can't I change this path? I need to change it to another hard drive.
I googled it for you.
This was my search phrase:
java console change temporary location
And this was the result that was most appropriate:
How to change Cache location for Java on windows 7
Step 1
Find javacpl.exe in C:\Program Files (x86)\Java\jre1.8.0_31("newest version")\bin*javacpl*
Step 2
Right click on javacpl than Properties---Compatibility---choose
run this program in compatibility mode for “Windows XP SP3″
Step 3
Go to
Control panel--Java--General--Setting--Location and Change it.
P.S. Close java control panel before step 1 if its open.

How to change the path of the cache directory in java ,or how to customize it for any user?

I want to change the path of : C:\Documents and Settings\abc\Application Data\Sun\Java\Deployment\cache to any specified Location
How to customize deployment.properties file but the changes should be generic to any user,i dont need to to it for every user.
Is there any way to do it??
The default java cache directory can be changed from within your windows interface by:
control panel>Java > General > Setting > Location
That's the general location of java cached files.
Note: if the Change button is disabled, go to your JRE>bin directory and change the javacpl.exe to run in compatibility mode (Windows XP (Service Pack 3))
Now if you are using java WebStart as your deployment tool, please refer to this link
and change the deployment.user.cachedir property in deployment.properties.
There is a deployment.properties file for every java installation. In my java configuration the location of this file is C:\Users\<username>\AppData\LocalLow\Sun\Java\Deployment.
Refer also to how to change Java cache folder automatically for WebStart programs

Categories