Developing Android on Sublime Text 2 - android

I wanted to start developing for Android, but found it terribly hard to set everything up so it would work on Sublime Text 2.
I know that I'm supposed to download and set up the Android SDK, but how, where and why? And how do I compile my projects and run them? This is a complete mystery to me.
I've been researching this for about 3 hours now and haven't had any success. Could anyone of you, please, help me by guide me through the process of setting everything up in ST2?
Please note that I do not want to use Eclipse IDE. I've grown to love ST2 and I'd like to stick with it.

I know that I'm supposed to download and set up the Android SDK, but how, where and why?
Visit the official site and follow the instructions for "other/existing IDE". I don't think anyone wrote specific instructions for using Sublime yet though (since you haven't found one).
And how do I compile my projects and run them? This is a complete mystery to me.
As others already answered, other than a JDK, you will most likely need to download and run Ant from the command line.

If you really want start Andriod development, without using the great support of an IDE like Intelji Idea or Eclipse, then you should properly look into building and running your applications in the command line beside Sublime Text 2

If you follow the instructions for using the 'Andrew' software module from github, you can get sublime to communicate with the android sdk and ant build tool via a tool called monitor.
https://github.com/Korcholis/Andrew
Kind of similar to a vim addon i used to use that talked to eclipse service.
But if anyone else is reading this, intellij (android studio) has come on leaps and bounds regarding speed and autocomplete.

Eclipse and IntelliJ are the known supported IDEs for Android development. If you don't want to use Eclipse or IntelliJ, read up about ant scripts and how to build with Ant. That should get you started.
Sublime Text 2, right now doesn't support Android development from within the IDE. The only option you have, other than using Ant, is to wait for someone to write a plugin for that.

Related

How to install or setup j2Objc in android studio steb by step

How to use j2objc in android studio?
I did not find any manual. How to implement and work with j2objc in android studio?
I'm a junior in java language, and I wrote one app for android, and now I need convert this app for iOS. It's a simple app.
I want use j2Objc for a separate build app for iOS, but I don't know how to work with j2objc.
Download distribution and this plugin. Follow instructions and everything will work.
Forgive this obvious question, but you have a Mac, right? You won't be able to build iOS apps without one. That's why many j2objc engineers use Xcode, since UI development and debugging are easier to do there.
I have win 10 machine.
OK, I downloaded it, unzip, and next step? I dont see any instruction, what i do with this. Paste in specific folder? Implement with plugin wizard? or? Maybe Im stupid, but realy I dont know how these features work on.
I see only:
This package must be built on an OS X system, with: ...
and for gradle plugin ...
oh shit!

Can I use Visual Studio as an IDE for cocos2d-x 3.0rc2, c++ development?

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.

Use Sublime Text 2 to develop Phonegap applications for Android

I've been using eclipse to develop Android apps with phonegap until, a few weeks ago, I decided to try Sublime Text 2. I found it to be so much better than the eclipse editor so I would like to keep using it. Only thing I'm missing is a quick way to test the app on the device inside Sublime.
Luckily, someone else also had the same idea and developed a plugin for this:
https://github.com/Korcholis/Andrew
Sadly, I cannot get it to work, I installed ant and pointed the plugin to adb but then nothing happens when I try to create a new project (and there is no error message in the console).
I also found this other plugin:
https://bitbucket.org/ucomesdag/sublime-android
But I have no idea on how to install and run it.
Did someone else found a way to do this?
A quick update into 2014.
As of PhoneGap Cordova 3.0, it is no longer required to develop Android apps via eclipse. You are free to use any code editor or IDE you wish as app building is done independently from eclipse via a simple command line.
cordova run android to package the .apk and install on any active devices detected by adb or
cordova build android to package the .apk only.
In your case, you can keep using Sublime and pop in the cordova run android command whenever you ready to go on a test run.
While I agree with Insane Coder that you should stick with supported IDEs to develop for Android, according to this link and existing Sublime Text 2 Ant support, you could build and develop your android project with this IDE (It will just take some time to set it all up... as opposed to using a supported IDE like IntelliJ or Eclipse).
Using PackageControl, look for "Ant". That will install syntax highlighting for Ant. Another plugin that enables the build command (ctrl+b) to work for Ant files, "Super Ant". You should be able to code for android in sublime text 2 with those installed.
On another note... Do you use windows? The Andrew project you link to, seems to have Windows compatibility issues. Apparently related to locating the "SDK" (he says sdk in Andrew's github page but, probably he means JDK?) in your hard drive. Which is probably a hassle because Windows typically installs stuff to "Program Files" and in code, that turns into "Progra~1" because of the space. In the link I give you there is another approach to it, so when you install the JDK set a folder that has no spaces in its name, like c:\java\jdk1.6.0_02 or something else that strikes your fancy. The problem you could be having with Andrew is that it isn't finding the jdk in your hard disk.

To develop in Android is it an absolute necessity to use Eclipse?

Do I need to use Eclipse IDE in order to develop in Android ? Most of the user guides insist on Eclipse !
No, it isn't. See developer.android.com for instructions on how to develop, both with and without eclipse.
Managing Projects from the Command Line and Building and Running from the Command Line, for example, shows how to manage and build a project (without Eclipse), respectively.
Eclipse is very good IDE for android application development. Otherwise there are other IDE's like:
Netbeans, JetBrains as mentioned by DAC
Plus you have got:
IntelliJ
No, it isn't; however, I don't see why you'd want to do otherwise. It greatly simplifies things when using Google's own SDK and Eclipse plugins.
I think it may be somewhat futile to develop for Android without an IDE if you plan on using the emulator, debugging and anything else that is useful for Android development; however, most of the other large Java IDE's support android:
NetBeans
JetBrains
No it's not. You could even use nicer languages like scala... (take with a pinch of salt)

How can I set up Vim for Android development?

Can anyone describe a good Vim setup for Android Development? I'm using Eclipse for now but I would really like to use Vim because it's faster and I like it better. I'm not interested in Eclim for example.
I'm interested in what Vim plugins are used (for Java, autocomplete etc.), how the .vimrc looks like and how the whole process of building/running applications works (as efficiently as possible).
I've once had to do some Android development on a netbook, and set up a nice Vim setup for this purpose. Seriously, it's easier than it seems:
Run emulator from the command line. It's better to do it anyway. I started mine with something like this:
emulator -avd BlaDevice -no-boot-anim -scale 0.65 -show-kernel
To build and reinstall your modified app to the emulator, simply run ant reinstall from the project root. Map this command in Vim to your key combination of choice.
I've used typical Vim setup: NERDTree, FuzzyFinder, and omnicomplete. Java syntax highlighting works out of the box.
Never bothered to install Eclim, omnicomplete works just fine in most cases.
I have been working on a vim plugin for android development: https://github.com/hsanson/vim-android. Still work in progress but it has most functionality needed for android development using vim.
I still have some issues to solve but most are not related to the plugin:
Gradle errors from aapt report the wrong file. This makes jumping to the error
from the quickfix window a pain as it opens the wrong file.
I cannot make javacomplete work correctly. When auto completing a class I wrote
it gets stuck in "Searching..." and when auto completing a library or external JAR
method javacomplete spits hundreds of errors making it impossible to use.
I've only done a little bit of Android development with VIM, but I'd very much suggest getting your head around Ant (which the SDK uses to build projects from the command line), and perhaps Maven if you're daring. You'll be using Ant a lot!
There are a few tab/auto-complete VIM scripts around, but don't expect them to be anywhere near as quick or useful as Eclipse. I've found myself doing a lot more typing than I'm used to from Eclipse...
Both of what #Dave and #buru suggested led me to work on a plugin for Vim that'd help you work on development in Vim for Android applications. Feature parity to top-level tools like the visual development isn't there yet, but I was wondering if we could generate some components by using Fries and extending it.
The plugin is called android.vim and it was on Github # jalcine.github.io/android.vim. I'm very open to ideas and pull-requests so feel free!
Edit: I've taken down this plugin because I haven't the time or focus to work on it :(
I have just create a vim script for android development, it is called adt.vim, and I am using it, hope you will like it.
http://www.vim.org/scripts/script.php?script_id=4330
If any suggestion, please tell me, it is still under improve

Categories

Resources