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.
Related
How can I create a custom jetpack-compose template, so I can avoid making the same changes over and over again to gradle and other files every time I start a new project?
Thx
You can write an Android Studio Plugin, search Google for some tutorials. There are quite a lot development and maintenance works to do though.
You could create yourself a starter project on git, and then clone that each time.
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 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.
So I plan on building for Android with cocos2d-x 3.0rc2 and there isn't a whole lot of updated documentation on what all I'm supposed to do to get up and running. I have the whole environment set up already. I can run tests and make some basic sprites just by editing the C++ files in Notepad++, however I need to get to a point where I am actually set up in an IDE. There are tutorials of importing projects into ADT, which I have gotten to run but I cannot edit the *.cpp files from inside eclipse. Is that how I'm supposed to set up my environment? Do people usually just edit in a basic text editor and run from command line or is there something I'm missing.
I also opened up the Visual Studio solution that comes with a new project and inside that I have auto completion and it's a nice environment, but there is still the hassle with makefiles that I just can't get working. I tried using some of the extended features and using CocoStudio exports in my projects and the compiler won't have any of that. Is there just a lack of documentation for people who are not comfortable developing for Android already?
When I make a new class, or use a new include, do I have to manually add that that to a makefile? If so, where is somewhere that I can learn how that process works and be able to apply it to new situations?
I feel lost because I'm not too used to getting into all the 'nitty-gritty' bits of development.
If someone wants to help me out understanding all this, I would be immensely appreciative.
Thanks,
Vynlar
Visual Studio 2012 is supported. Here is documentation on setting up Cocos2d-x v3.0 with Visual Studio: http://cocos2d-x.org/wiki/How_to_run_cpp-tests_on_Windows
This question is like two years old, but if anyone hits it in search results there is now a Visual Studio project to target Android devices with Cocos2d-x. It's not integrated with the cocos template system, so it currently needs to be updated per cocos version. Currently it's for VS 2015 Update 3 and Cocos 3.12.
https://blogs.msdn.microsoft.com/vcblog/2016/07/12/cocos2d-x-visual-studio-android-project/
I was the developer on this, so I can be contacted with any questions.
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.