Can I use Android Studio when teammates uses Eclipse ADT? - android

Just a quick question I did not find a good answer on. We are currently working on an APP created with Eclipse ADT Bundle. I recently started exploring Android Studio, and like it. Is it possible to still collaborate with my mates using Eclipse with a shared GitHub repo?
I noticed Android Studio converts the project to its own file structure, so I guess this does not go well with Eclipse, and the repo.
Is there any solutions for this? So I can keep developing in Android Studio, push to GitHub, while the rest of the team use Eclipse?

I think you can do it, you'll just have to explicitly define a sourceSet that matches the Eclipse structure. If you use any other build variants, they can't have any sourceSets because you wouldn't be able to check those files in to source control. However, there are several useful things you can do with build variants just with the build file. I think you can check in the build.gradle and other gradle stuff and it won't mess up your coworkers.

Related

Why don't we have a single file to open an Android Studio Project?

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.

How do I use Clojure in Android Studio using Graclj?

My ultimate goal is to be able to write Clojure apps for Android, using Android Studio and Cursive. I started with leiningen but found out that it is a build system that is independent of what Andoid Studio uses ie Gradle. So I tried leiningen with Intellij, but couldn't get Android deploys to work except from the command line. Since I wanted to integrate with Android Studio, I decided to try Graclj: https://github.com/graclj/graclj which is a Gradle plugin for Clojure.
I can get the Graclj tutorial running in Android Studio, as per this guide:
https://github.com/graclj/learning-graclj/tree/learning-0.1.0
However:
Graclj expects the Clojure src and built classes and jars to be in the root project
Android Studio expects src and classes to be in the app subproject
After the tutorial I end up with separate Gradle build tasks for Graclj and Android Studio but I don't know how to integrate them
So, can anyone suggest a way that I can hook into Andoid Studio's build process?
Do I need to change some settings to the Graclj plugin to do this? If so, how?
Do I need to change some Android Studio plugin settings?
Do I need to add/change something in the Gradle build scripts?
Am I heading down a dead end? ;-)
I have looked at the Android Studio build process: http://developer.android.com/tools/building/configuring-gradle.html
but I don't know enough about Gradle to know what I'm supposed to be doing here.
If I need to supply any more info, just ask.
Any help appreciated!
Unfortuantely, I don't have any Android (let alone Android Studio) experience. However, I'll do my best to answer based on Gradle/Graclj knowledge.
Graclj does not require you to use the root project. You can apply the plugin(s) in any of the projects that you have in your build. However, I don't know how well a model-based plugin like Graclj will work with the "traditional" Android plugin. You could try the "experimental" one that's using the model approach, though there's a decent chance that it won't be compatible unless there's one that works with Gradle 2.12.
Alternatively, you might be able to add a dependency to the Android app project on the JAR produced by Graclj (which you may still want to put in a project besides the root). Not sure if there's a very good way to do this (haven't tried myself).
dependencies {
// my-other-proj being whichever one you use Graclj in
compile project(':my-other-proj')
}
Or maybe you would need to add it to a configuration first in the my-other-proj to interop with traditional plugins:
artifacts {
archives createMainJar
}
It is possible that you're at a dead end (for now). Graclj is very new, so this stuff should all be possible eventually.

Unable to build android-support-v7

I've downloaded the Android SDK. I am trying to build the appcompat project. I've read that project is located here:
C:\Android\sdk\extras\android\support\v7\appcompat
I have imported the project into my workspace. It doesn't build.
I could go into great detail about which SDKs I have installed on my machine, etc. I could say that the values-v11, values-v14, and values-v21 folders all have errors, even though I have downloaded all three of these SDKs. But I am pretty sure if I import a project from the Android SDK website from the Android developer website, and I try to build that project, it should just work. I've followed the instructions here:
https://developer.android.com/tools/support-library/setup.html#libs-with-res
...and still not working.
So, why does this not work? I don't even care how to get it to work, I want to know why this does not work and why would I have to do any extra work or research to get it to build? Is this a problem with Eclipse? Should I be giving up on Eclipse and moving to Android Studio? This appears to be an incredibly simple thing to do and yet it does not work anymore.

Google launcher building

I tried to build this project using JetBrains IntelliJ IDEA but it was unsuccessful (there were a lot of errors). The project has an Android.mk file, but I didn't see the C++ code.... How can I build this project? I've tried to use another IDE, then I tried building from the console but it was not useful. Perhaps, does Launcher3 need NDK to build it?
You'll need to isolate the launcher's code and then identify all of it's dependencies. If the code has any C++ code then it definitely requires the NDK and currently IntelliJ/Android Studio does not have any stable support for NDK based app development (though it is a work in progress) else if it is pure Java (most probably) then you'll have to manually add the classes and build the app from Android Studio! Either way you will have to dig deeper into the source and know for yourself. Unfortunately there seems to be no easier option, for now. I wouldn't mind being proved wrong for the matter.
EDIT :
I glanced through the code and I noticed there are no C++ source files or library (*.so) files. This isn't a gradle project and hence cannot be built as one. You'll need to setup a gradle based Android project and then begin adding the sources (src, tests etc.) and their dependencies (res etc.). You can start of here : Getting Started with Android development if you're new, else you can move to this : Gradle and Android

Store android run/debug configuration IntelliJ idea and svn

I'm recently started working on a school project using IntelliJ IDEA to develop an Android app. Most of the guys in my team (me included) are used to the way visual studio organizes project into .sln files. We've had all sorts of frustrations with IntelliJ mostly because we don't understand how IntelliJ organizes projects. We finally got the project to load reliably without having to make changes to each developers set up by following the steps here:
http://devnet.jetbrains.net/docs/DOC-1186. However, now anytime we get latest the Run/Debug configurations disappear. Anyone having the same problem?
Thanks,
Check this answer.
Make sure that you are sharing your configurations and files from the .idea/runConfigurations directory are added to the version control.

Categories

Resources