I tried following the instructions here link text to make a scala application. However when I run the "ant install" command I get the following error
aaptexec doesn't support the "basename" attribute
I read this is because of the new sdk 7 version here. However noone on that thread seems to offer any solution.
Has anyone tried to do this with the new sdk?
Thanks in advance
You may take a look at Building Android apps in Scala with sbt, I found it is much easier to use SBT to build Scala/Andoird application than Eclipse.
You should also use https://github.com/steve918/android-plugin instead of the plug-in describe at the page if you want use latest Android SDK.
http://code.google.com/p/treeshaker/ may be what you're looking for.
It's a build step for Eclipse which, used together with Scala IDE, will enable you to use Scala on Android.
Solution found here to use the latest Android SDK, with Eclipse 3.7.2 and Scala 2.9 :
https://stackoverflow.com/a/11084146/1287856
It compiles under Android SDK 18
It does not have the strange side-effects of Treeshaker like forgetting to include some classes.
Related
I was planning to try to learn Android, and I have totally no knowledge on Android development.
But Vim is my favorite editor, so I prefer Vim rather than Eclipse.
How do I set up this environment, and how do I run it (from beginning to the end)?
Currently in,
~/.vim/bundle/
I already got
- conque-shell
- nerdtree
- supertab
- command-t
- taglist
...etc.
these plugin. Are there other plugins that I should add in?
I would strongly recommend you to use Vim plugin Eclim for Android development in Vim. I used it, and I found it extremely useful. Code autocomplete, refactoring and so on, is just awesome. Actually, when I started using Eclim, I got power of an IDE with my favorite editor Vim.
Also, you might want to read this publication about using Eclim for Android development.
You don't need any Vim plugins for Android development.
All you need is
Apache Ant for building the resulting app
A Java 5 compatible JDK
The Android SDK
Then you can use Vim to edit the AndroidManifest.xml, the layout.xmls, the Java source, the build.properties, the build.xml, and so on.
You need to know how to build an Android project by Ant.
I also use Vim to develop android project, and I have just created a Vim script for Android development. It is called adt.vim, and I am using it. I hope you will like it. http://www.vim.org/scripts/script.php?script_id=4330
If any suggestion, please tell me. It is still being improved.
I am an eclipse user and android developer.
I am trying to develop android applications using scala. I managed to do an hello world once in eclipse and now I am trying to do it with Intellij IDEA, so I can choose the best option. I managed to run simple scala examples in Intellij and I am trying now to create an android application there.
The problem is: Eclipse seems a lot more EASY to build an android application with scala than Intellij. For what I have seen you need to use SBT and install a lot of "extras" to get things done.
I have seen some questions here about IDEs for Scala. But didn't find a recent question about the combo Scala + Android.
So, my question is... Should I give Intellij a try or eclipse is just fine? Is it possible to run the application on my smartphone easly with Intellij?
I haven't tried Eclipse with Android IDE so I cannot compare. I use IntelliJ 10.5 for Android development with Scala. And it just works perfectly.
All you need is to download Scala plugin with IntelliJ's build-in plugin manager. Android support is installed by default in Idea 10.5.
I can highly recommend Idea 10.5 for Android development with Scala.
I have tried Intellij Idea but it wasn't as simple as Eclipse. You should prefer eclipse rather than using this Intellij.
I've started learning Scala, and I... I think I'm in love. I've only coded small test snippets so far, but since I currently working in Android development, what I really want to do is try my hand at writing Android applications in Scala.
I've found articles and questions on the matter, but mostly referring to older versions of the three tools (Android SDK/Scala/Eclipse), so the general question is:
Is anybody coding Android apps in Scala right now, with the latest SDK, Scala 2.9 and Eclipse Indigo? How viable is it?
And, in particular:
How's the interaction/integration between Scala's features and the Android library?
What's the state of the Scala plugin for Eclipse? I've read all the features you'd expect are there, but I'd like to know first-hand stories, specially about the debugger.
How well does the build process (scala to java to dalvik, ant, proguard, etc.) automate?
Thanks!
We are using Scala heavily to test our Android code - you can read a writeup of how we're doing so here. We use Ant or SBT to compile - there's an excellent SBT plugin for Android development.
Having said all of that, I'm not sure that I would recommend Scala for production Android development. In particular Scala 2.9.x is basically unusable as there is no good way to get the libraries to work on Android. You can read about the issue here.
It's a real pity, as Android development would benefit considerably from Scala if we could get it working properly.
Solution found here to use the latest Android SDK, with Eclipse 3.7.2 and Scala 2.9 :
https://stackoverflow.com/a/11084146/1287856
It completely handles the android library
You can make Android Library out of scala projects as usual
The build process is completely automated, including proguard-ing and exporting the project with the regulard Android tools.
I started to implement the android application (a twitter client) from the book "Learning Android" with Scala 2.9.0-1 a while ago.
In my opinion you can use it. I had only one problem with the parameter list at AsyncTask (see this link, problem #3).
If you want to checkout out the project, you can find it here.
This video from ScalaDays 2011 may be hepful:
Scala on Android: Real-world Experience at Bump Technologies by Michael Galpin
EDIT:
If you really really want to run Scala code on Android (and not really make an app, but for yourself), then I have an easier solution. It depends on if your phone supports the procedure. In summary the steps are:
Install Ubuntu on your device (as described here). This will not affect the Android installation.
Boot Ubuntu, install JDK, Scala, etc, copy your Scala jars and run from there.
I have tried Scala on Android using various suggestions found on the Internet. However, I have never been able to get a "one-click" solution for Netbeans. Eventually I settled for Java + Eclipse. However, the urge to create Scala programs on Android persists.
Has anyone successfully used Netbeans IDE for Scala development for the Android platform? And that too using the IDE's build tools?
Ideally the following features are needed:
Scala code completion, syntax highlighting, error checking (as in NB-6.8 + Scala 2.8)
Automatic deployment on Android using one-click
No messing around with Proguard config
No messing around with signing of the jars/apks
Please post a step-by-step guide if this is possible, or please link to an external page giving details.
Have you tried the new eclipse plugin? Those are a major improvement from a few month ago. There should be versions for 2.9.1 and (if you need scala 2.8 ) Scala 2.8.2 see www.scala-ide.org
I'd like to build some native libraries for android using the NDK (native development kit), but i'd like to use Visual Studio 2010 to do it. I've googled quite a bit but haven't found any information on it. Does anyone have any experience with this and know the steps necessary to make this happen? I have CYGWin installed, made sure i get Make (per the NDK instructions), but i'm not really sure of the next steps in terms of setting up the project, compiler in visual studio, etc.
If anyone knows of any write-ups, tutorials, or links to sample projects, that would be awesome, as there isn't much on google yet.
thanks!
Here's another solution, which integrates the NDK fully within Visual Studio. No makefiles. It behaves like a proper Win32 project:
Here's an excellent blog post about how you can configure your environment to debug android NDK code using Visual Studio.
Visual Studio is officially not supported.
Some problems (but not limited to):
MSVS cannot create the proper ARM binaries
Android makefiles (.mk) are not supported by MSVS
There are however, third party solutions:
vs-android
VisualGDB
You might want to check out DS-5 as well, though it's not Visual Studio.
The answer depends on what kind of integration you require.
To just build the native Android code from Visual Studio you can create a new Makefile project, and make it run ndk-build.cmd when you press "build". If you would like to get the error messages mapped as well, you will need to parse the output of ndk-build.cmd and convert it to a format that Visual Studio can udnerstand.
If you want to debug your native Android code from Visual Studio, you will need a third party tool that will control ndk-gdb on behalf of Visual Studio and provide workarounds for several bugs (e.g. rebind breakpoints when libraries are loaded).
You can try our VisualGDB for Android tool that does exactly that - creates projects that wrap ndk-build and controls NDK debugger on behalf of Visual Studio. If you need more information, there is a step-by-step tutorial available.
I have not found a direct clean solution, here is my workaround.
I develop my native code on VS as a static library, and use some test project to try it as a console aplication.
When it is ok, from cygwin I use a little bash script that copies all needed files to the jni folder and launch the standard android ndk make command. (also copy some file to assets folder when needed), producing the executable in the right folder.
To use the pthreads I have linked my projects to pthreads-win32.
The only files I do not compile in VS are the jni code.
I hope this can help you.
There's also a couple of other third party alternatives for developing ANdroid apps with VS in addition to those above. There is the open source dot42 located at http://www.dot42.com and Remobjects, http://www.remobjects.com , which allows you to program in c#, Pascal, and Swift. I have played with the trial of Remobjects and am now starting to play around with dot42.
My use of the remobjects trial allowed me to recreate in c# the first five chapter projects in the textbook of the Android course I took. I haven't had the same success with dot42 so far but I need to find some time to really give it a chance.