So I created a project in Android Studio in a laptop, and now I want to transfer it to another laptop. I will have to make necessary changes including the project path name. Is there any shorter way which can allow me to do so in a simple manner ? The new device is running on 2.1.2 and the previous device has 2.1.1
Actually, you don't need to do any change in the project . After transfering your project to the new laptop, open Android Studio, open the File/New/ImportProject and select your project. This should be enough.
Okay, so I found the solution to my problem. If one has to transfer project from one PC to another, the versions ( compile sdk version, appcompat version, IDE version, etc) should be matching in the buid.gradle file.
If one is working on multiple devices on a same project, try to keep all the devices at the same version.
Related
Why don't we have a file similar to the .xcodeproj (for XCode applications) or an .xds (for Sencha Architect Projects) for our Android Studio Project?
I'm pretty sure a good number of you here have experienced the frustration of trying to import a project you see online in order to piece it apart better and learn how it works. I get that we are supposed to Import Android Projects built using Eclipse and Open Android Projects built using Android Studio.
However, why is it that we have to go through File -> Open -> then pick out the directory of the Android Studio app that we want to open? And the thing is, Android Studio doesn't seem to know it's an Android Studio project until it tries to open and build it. In the screenshot I have below, I have the sample Android Studio projects of ARToolKit, but I've only imported two of them.
As you can see, only those I've imported "can be seen as an Android Studio Project" as indicated that they have the Android Studio logo instead of a Folder.
This can be an issue for those just starting to develop in Android Studio on their own and they try and use existing projects (build from Eclipse or Android Studio) and they hit a snag with just trying to import the projects for reference. They might not know that they should import the folder and not the projectname/src subfolder. It adds to the "steep learning curve" that Android Development has if opening/importing projects aren't streamlined to a degree.
To sum up, my question is:
Why don't we have a single file that we can open that would in turn open Android Studio and import and build the project if it isn't built yet?
Android is not iOS. iOS development is only possible in xcode, hence it makes sense they added a shortcut to open it in xcode directly with a .xcodeproj file. Make life easier for iOS developers.
Android development however can be done outside of android studio as well. Eclipse is just one example, there may be other IDE's that support this. This is possible because android has standalone SDKs and tools that third party applications can use. iOS does not.
Imagine you are working on an android project in android studio. Then your boss tells you someone from 3000km away is going to help you. This guy may be using android studio, but maybe he isn't. When there are multiple options that developers can choose from individually, you do not want to pollute version control with files that you are using, but others may not care about. Each their environment.
This is merely a logical conclusion that you can come to by comparing. The "real" reason why this was done can only be answered by the people that created (adapted intellij) android studio.
This has been very frustrating to me too.
I try to give you a "beta" answer, waiting somebody to confirm it to me.
An Android project is just the composition of many parts that in some cases are concurrent to create the apk file.
It's just like what happens for the whole java projects: you have the main/src/java, the main/src/test, the maver or gradle files, the gradle or maven wrapper, the manifest, the configuration etc.
So you won't have a single project, but a series of folders that can contain many "flavours" or "versions" of the product itself.
The only help it is given to us is the Android studio icon that appears if a folder contains an android project in its subfolders.
I don't know if I have really answered to you, I just have given you my impressions and my thought.
I'm fairly new to android development using Android Studio. The examples online say to build with Gradle. I choose Gradle when importing the project but then I get an error saying that it is not a Gradle based project. Does anyone know how I can get over this to run it on my phone?
Pick a sample project to import that has build.gradle file in BOTH the app module directory AND the project root directory.
Strongly recommend rather than importing an existing project, you create a new one from scratch yourself, following along with a tutorial.
Here's a really good first tutorial for Android Studio which is recent (August, 2014) as of this question, so it will all be relevant to the current version of Android Studio.
http://www.codeproject.com/Articles/801078/Hello-Android-The-Hello-World-Application
As far as getting the app onto your phone you can either (a) plug in the USB cable from the phone to your PC and run from Android Studio, or (b) email the app's APK file as an attachment to any email address you check on your phone (such as gmail for example). For the email method, you also need to change a security option to allow apps from unknown sources.
I recently upgraded computers and in the process I upgraded to using Eclipse Indigo to develop Android apps. The problem is that Package Explorer will no longer display my projects for either Android 2.3.3 or Android 3.0. It does however display earlier Android versions (e.g., 2.0 and 2.2) in their respective workspaces.
I've checked, and the SDKs for 2.3.3 and 3.0 are installed, and the application/projects are in the correct workspace. Further complicating the issue is that when I try and "Import" the 2.3.3 or 3.0 applications/projects into their respective workspaces, Eclipse won't allow me to do so because it says they already exist in the workspace.
Anyone seen this behavior before or have any idea how to correct it? Thanks!
It sounds like some of your desktop files are corrupted or not recognised by Indigo. Try moving the folders for the projects out of the workspace folder, and then importing them.
I am building a project under netbeans with a lot of preprocessing instructions. Netbeans handle that pretty well but unfortunately it is not very well supported as an IDE for blackberry and android.
So the idea behind this question is to import the project into eclipse in order to get the new features of every plugin and ease the development. I already found a pretty nice solution for handling preprocessing instructions with Antenna, but I would like to know how to handle the multiple facets of the project : an android project with ADT, a blackberry project with its plugin and finally a J2ME project as well. My goal is to taking advantage of the best plugins eclipse has to offer.
(And the project compiles with ant, so no real problem on this side).
Regards,
Stéphane
Well, you would have to create a separate project for each Android, Blackberry etc in the same workspace, then you would have to define the logical dependency between those projects. So if Project A is dependent on Project B, right-click on Project A in the project tree then Properties > Java Build Path > Projects and add the Project B to the list of projects Project A depends on.
This will allow you to work on Project B as if it was a stand alone project and you and work on Project A as if Project B was a part of it.
You can do this with any number of projects.
Regards,
get BB eclipse plugin from Blackberry site
install Android ADT manager from developer.android
install j2me wireless toolkit
create all project separately into same work space
use relative sdk for build path
after creating project you can also copy your source files to your project n file system, you can defile project dependency as Ali said
i reccomend to disable pre-processing, if you are using ant to build, just disabele it from windows > preference
My Suggestion to you is build your project in HTML5.If you are targeting the android as well as Blackberry .I do not Know How you will do it but It will be really easy to transform the the application of Blackberry to Android.
You have to install the BlackBerry plugin from the RIM site and it is a huge download that includes Eclipse itself. Then you can add the Android plugin via the Eclipse "Install New Software" menu.
I personally did it on my home machine and here is how How I had done
First install the the Eclipse plugin provided on blackberry developer site
Next install the android in same eclipse from Android developer site.
And voilla you are ready for android and blackberry development on single eclipse. I dont know about J2ME bcoz I no longer works on it but I think the plugin for Eclipse will do the work
This may not be quite what you're looking for but perhaps use Ant to do the builds, packaging etc. That makes it easier to support multiple platforms, set preprocessor macros etc. So the IDE would be used for mostly editing. Note that on BB you can have the IDE refer to the .jar thus resolving dependencies.
I had faced a similar issue. I installed Android first and was working on Google maps project .Since I shifted to Blackberry for a while, when i tried installing that plug-in,it did not accept it. Later after much research I found out that the Emulator for android was supporting Maps which inturn does not support installation of BlackBerry. Pretty weird. Like ber444 mentioned, BB plugin is a huge download file of 402 MB which consists of eclipse 3.5 support.
I was working on Ganneymede for android and installed indigo for BB but its not supported
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.