Create basic (Eclipse-style) Android project in Android Studio - android

I'm trying to follow tutorials on Android but the default project that Android Studio creates has stuff like PlaceholderFragment and fragment XML files.
I'm having trouble following any of these guides because they all expect you to use Eclipse, which creates a different standard project without all this fragment code.
Should I just switch to Eclipse?

I would recommend synchronizing your tutorials and tools. Right now, that probably means switching to Eclipse. Android Studio is still an early-access previews. I don't recommend that newcomers to Android start with Android Studio, in part because of the struggles that you are encountering. Android Studio uses project structures set up for the new Gradle-based build system, which is different from what Eclipse uses. Plus, the wizards may generate different files, as you are seeing.
Now, if you can find a set of tutorials that happen to be based on Android Studio, and you want to go that route, that's your call. But a newcomer to Android trying to translate instructions for Eclipse into instructions for Android Studio is likely to get frustrated. So, if your tutorials are for Eclipse, I would recommend using Eclipse.

Related

Splitting an Android project?

Is it possible to split an Android project so I can like create a "module", or similar, with one environment e.g. Eclipse and using another environment to do everything else e.g. Android Studio? And to make them communicate with eachother or converting everything to Eclipse would take less time to develop?
I've created a project in Android Studio and now after alot of work I found out I need to convert to Eclipse as Android Studio does not offer the support it requires for Google API.

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.

Adding custom project wizard to Android Studio

I'm trying to develop a plugin for Android Studio to add a new type of project to the selection of project wizards. Unfortunately it seems like Android Studio blocks every project wizard besides the one for Android projects. So far I already have a solution which works well in IntelliJ but not in AS. I already took a look at this question but as I am trying to create a new wizard instead of reactivating an existing one I hope there might be a solution for that.
For everyone trying to convince me to use IntelliJ IDEA with Android Plugin instead: unfortunately this is not and option as I have to stick to Android Studio.
tl;dr: trying to create a project wizard in Android Studio. Works in Intellij IDEA but not in Android Studio.

Getting LibGDX to work in Eclipse

So I've been trying to install libgdx for a few days with Eclipse and it kept telling me various things (Android ADT, Java JDK, etc.) needed to be updated, so I did that, but I kept getting the same error.
Then I decided to download an older version (0.9.8) and I used the gdx-setup-ui.jar to set up my projects. But upon opening them in the Eclipse/ADT bundle, the Android and HTML projects had errors in them involving the import statements, which I tried to solve to no avail.
This is the tutorial I've mainly tried to follow.
Does anybody have a solution for me to get it to work? I'm most familiar with Eclipse, having worked with it for Android for a while now, so I'd prefer not to switch IDEs.
Thanks in Advance
Use ADT (Android Developer Tools) instead of Eclipse. (Is the same thing anyways)
http://developer.android.com/tools/index.html
If you got errors after importing your projects on android, right click on the android project, and at android, check the version that is there.
For HTML you need to install the GWT plugin.
Recently libGDX has moved to Gradle, so you might want to look over that
https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle

Reusable Projects in Eclipse/Android

I'm new to development on Eclipse (for Android). I have been a .Net developer using Visual Studio for YEARS now. I'm excited to now try something new.
I have just started working on Eclipse and managed to develop a small database application. I want to build reusable components which I can use across multiple projects. In Visual Studio, I build a new project and "reference" them in other projects. This way changes to the components get reflected in all referencing projects.
Is there a way to do a similar thing in Eclipse? I don't want to include the .java files in my project, rather I want them to be in a separate project. I'm also looking for the best practices to do this in the Eclipse/Java world.
Create a library project for the one you want to reuse.
https://developer.android.com/studio/tools/sdk/eclipse-adt.html
Update: Eclipse is not supported now, here are the docs for Android Studio.

Categories

Resources