Android Eclipse, Dropbox, Windows and Linux - android

I'm using my Dropbox folder to store my Eclipse workspace in (instant back ups) but want to develop on both Linux and Windows. (I think) the workspace file stores the location of the Android SDK which is different on both machines /home/android... and c:\android.
Is there any way of developing on Windows one minute and Linux the next? (the issue is the directory of the Android SDk.
thanks

The best solution is source version control, checkout a comparison table on Wikipedia.

I use Dropbox for this two, I switch between Windows, Mac and Linux. This is how I do it:
Put the Windows version in the Dropbox
Create a new Android Project with the same name in Linux somewhere other than Dropbox
Delete the assets, res and src folders and replace them with softlinks to the ones in Dropbox
This way each OS has it's own project files, but anytime you update a resource or code file it will update on all OS's.

Related

Are files in Android SDK Platforms folder on Windows and Linux the Same

Are the files in Android SDK platforms folder on Windows the same as the one in Linux? I just want be sure than to download files I have already on my computer.
It´ll sure not be the same. Check this answer they explain how to check it
https://stackoverflow.com/a/16582792/3617531
EDIT
As you were asking for the files, just check this url. You will see the sizes are not the same between linux and windows, then, I recommend you to download them again.. and make it a fresh install...
https://developer.android.com/sdk/older_releases.html

Is it possible to download the android-sdk_r22.6.2-windows.zip for android studio separately and just unzip in the folder where it should be

My college wifi is preventing me from downloading of large files unless i use some online proxy servers. So will it be possible?
Yes it is possible. Download it and unzip it in any folder and then use it in android studio.
See this link for setup path Android Studio - How to Change Android SDK Path

How to use a Android Studio project on two computers?

I use two computer for coding. My desktop pc and the notebook. I sync the two computers with dropbox. How can I import/load a project on each of this two computers? The project base folder is different on each computer. When I try to load/import a project which is created on the other computer it loads the project but I got a error with a wrong path.
"Gradle "Test2Project" project refresh failed:
Could not fetch model of type "IdeaProject" using Gradle distribution "http://services.gradle.org/distributions/gradle-1.6.zip".
Project directory "C:\Users\thomas\AndroidStudioProjects\Test2Project" does not exist."
The wrong pfad is the right pfad on the other computer. How can I import Android Studio projects so that it works even on another computer with a different folder structure?
Like the others i agree, that using a VCS would be the best solution. Even though you can try to filter all android studio related files (like *.iml, .idea folder and local.properties). I don't know if you can do this with dropbox or if you need some kind of 3rd software.
After that you should be able to make source code changes on both computers without greater problems. (You may have to declare project dependencies changes for the android studio twice)
Builds depending on the build.gradle files should work to. But again: using a VCS is the better way to go.
Go for git, you can use bitbucket.com as a free remote repository.
This is a problem I have ran into when trying to store Android projects in a Dropbox folder. What happens is that Machine 1's IDE is mapping system resources (like the SDK) as being in that machine's filesystem. When you go to Machine 2, everything will work EXCEPT for what you expect--because the SDK will probably be in a different spot!
One way to get around this is to use your VCS (dropbox, git, whatever) as a repository for JUST your source files, and then have a local project created on each machine that reads from the Dropbox folder. This requires two separate projects that are mapped differently, but that have the same source folder.
I discovered this problem when I tried to load up an Android project on a new install on a Mac machine:
Do you see what's happening there? My Mac Android Studio is saying, "Hey, I don't see where "C:\Android\SDK is, but I do see that you have an Android SDK in a different folder, so I'm going to update your project files to reflect the actual location of the SDK."
In my opinion, the only way around this is to create your project on both machines, and version control your source and assets folder. If you don't create the project separately on each machine and use VCS for just the source and assets, the only way to get around build and filepath errors is to store your SDK in the same folder on each machine. This worked for me when I was building on a Windows desktop and Windows laptop, but no longer works for me since I am using a Macbook Pro.
I know this was questioned about 4 years ago, but this is up to now still an issue. Using a VCS seems like a good solution, but for me it is simply more overhead than i want to have. I also use Dropbox to synchronize my folders and the history they provide is for my private programming needs good enough. So i think, it would be good, if android studio simply uses relative paths.
I know it needs some system paths and it does a good job in looking at the local.properties and setting it to the correct place when the project is loaded.
The main problem with using Dropbox are the build-directories. There are many many references to fully qualified paths in the files within these directories. So my solution was to exclude the build-directories from Dropbox-synchronisation.
When you work at your laptop, build the app, create new files, change files or delete files, the build on your pc will be completely outdated when you switch back to it. but android studio will recognize this and do a fresh build when you start your project for the first time after working on the laptop.
so the biggest problem at this point is the file local.properties and this is handled correctly by android studio. it may be a good idea (or a really bad one, i don't know the drawbacks) when the build system wouldn't write fully qualified paths in the files within the build directory.
But up to now this is my solution for using Dropbox and not using a VCS:
exclude build-paths from Dropbox synchronisation
i hope this helps somebody.

offline installation of an Android PLATFORM on Windows?

Okay so I have followed instructions on earlier questions in order to offline install the Android SDK, platform-tools and tools, and now I am trying to install an Android platform. (When I run "android list targets", it returns that there are no available targets, and the platforms folder is empty).
What types of files are actually IN the platforms directory? I have files from the repository like "system.img" and "kernel-qemu", but I don't know where to put them.
Could someone let me know what their C:\Android\platforms folder structure actually looks like for a working installation?
(NB: for background, I am able to get to the URL "dl-ssl.google.com" through my browser and even the Eclipse internal browser, but for some reason it can't be accessed from the SDK manager, so I can't download any components or platforms!!)
For what purpose you want to install android platform? If you want to develop apps, you need a lot of stuff from platform folder except "system.img" and "kernel-qemu": android.jar, ant tasks, tools and a lot of resources. If you want just to run emulator, you probably need not all of that...
This is contents of my platform folder: http://ccfit.nsu.ru/~izhovkin/list.txt

Android: Is it possible to cut/paste android SDK and use it?

I am using eclipse as IDE for android programming. I have update android SDK to API 9. these are installed on my laptop.
Now, I want to transfer all of these to my PC. On my PC, I didn't have eclipse and SDK.
My question is, may I copy folders of eclipse and SDK from laptop and paste it on my PC? can I use it and create new project after this?
Thanks
Try and see is the best answer to this.
My suggestions is to launch eclipse on your desktop and get ADT.
Otherwise I think you have to be careful where your Android SDK is. if you put in Eclipse then it should work.
(In my case I needed the SDK and NDK to be at the root of C:)
bottom line there is not better way than a clean installation
Yes, you can just copy the whole project (your app) folders over to your PC. In Eclipse, use the File/Import… command, then select General/Existing Projects into Workspace to add the copied project/s to your Eclipse workspace.
As for the Android SDK folder, I wouldn't transfer that one over, and just run the SDK installer for Windows again on the second PC to be sure.
Yes Very much. Just copy and paste. This should work in most cases. (Except if you try to transfer a 64bit eclipse version to a 32bit machine. If this happens just download the eclipse 32 bit version and point your workspace and android SDK to the copied one).
Copy paste has and advantage if you are planning to generate debug key (need this if you are using Location Information using Google API). If you copy paste, you dont have to keep generating a new key per machine.
Yes, you can copy all the things as far as you keep respecting the path changes. Keep track of them and change paths in Eclipse. You must have Java although.

Categories

Resources