Gavin Pugh - A Videogame Programming Blog

vs-android v0.93 Released

14 November, 2011 at 10:21am | Android, C++

In an effort to post more often in this blog, I’m writing up a minor vs-android update. I don’t usually write here about the minor version changes, I usually just fire out a tweet when I do those.

I actually started work on this one, the evening after I published XNACPC. I was going to fix some of the issues of vs-android, which were posted to the Google Code page. One of them was related to a new Android SDK (the Java/apk building counterpart to C++’s NDK), which caused issues when building the vs-android samples. So I went and downloaded the new SDK. I also figured I should grab the r6b NDK, which had been out a while now but I hadn’t updated to yet. To my surprise NDK r7 was out! Coincidentally it was posted up the very same day I decided to check it. Spooky.

Breaking Changes

Unfortunately NDK r7 introduced breaking changes for vs-android. Specifically the names of support libraries I was linking with, were renamed. This, along with the SDK R15 issues were a stark reminder that when Google change things like this, they are likely to break vs-android. Fortunately addressing these changes was straightforward.

Interestingly NDK r7 brings with it a ‘Cygwin-free’ build method. Since the compiler and linker have always worked without Cygwin, it only seems like ‘make’ was an issue for them. So I’d imagine the inclusion of a Win32 native make is what allows them to do this now. Glad they’ve seen sense that Cygwin isn’t at all popular with most Windows devs. 🙂

NDK r7 also brings support for Android 4.0: “Ice Cream Sandwich”. I’m not entirely up to speed with what’s changed, but the API’s available for the NDK jumped from “android-9” to “android-14”. With nothing in between. ‘9’ being support for Android 2.3.2, and ’14’ being Android 4.0. So oddly enough they skipped the 3.x releases entirely for the NDK. I guess nothing changed to anything exposed to the NDK, during that period?

v0.93 Changes

Here is the list of changes made in v0.93. Pretty much all just bug fixes, and support for some small additions to the new NDK:

  • NDK r7 was a breaking change for vs-android. This version now requires r7 or newer to be installed.
  • Fixed breaking changes to the location of STL libraries. Also fixed new linking issues introduced by STL changes.
  • Removed support for defunct arm 4.4.0 toolset.
  • Added support for android-14, Android API v4.0.
  • Added support for the dynamic (shared) version of the GNU libstdc++ STL.
  • Tested against newest JDK – jdk-7u1-windows-i586.
  • Added support for building assembly files. ‘.s’ and ‘.asm’ extensions will be treated as assembly code.
  • Correct passing of ANT_OPTS to the Ant Build step. Thanks to ‘mark.bozeman’.
  • Corrected expected apk name for release builds.
  • Added to Ant Build property page; the ability to add extra flags to the calls to adb.
  • Fixed bug with arm arch preprocessor defines not making it onto the command line.
  • Fixed bad quote removal on paths, in the C# code. Thanks to ‘hoesing@kleinbottling’.
  • Removed stlport project from Google Code – This was an oversight by Google in the r6 NDK, prebuilt is back again.
  • Updated sample projects to work with R15 SDK tools.

You can get the latest vs-android here:

Kindle Fire

I have my second Android device arriving soon. I ordered a ‘Kindle Fire’; I’m yet to try using a tablet computer. At $200 the price was right for me to take the plunge.

I’m looking forward to coding for it. I’d imagine it will help speed the development of vs-android. I haven’t been working on my personal Android project for a while, so it has slowed how often I update it. Certainly helps to ‘eat your own dog food’. 🙂

Comments

  • Hmm, I don’t see a forum or mailing list of vs-android so I guess I’ll post here.’

    Before finding out about vs-android, I set up an impoverished VS build environment with a pre-build step that converts GCC error message syntax for Visual Studio recognition:

    SET NDK=C:\…\android-ndk-r7b
    SET SED=%NDK%\prebuilt\windows\bin\sed
    rem For some reason [0-9]+ does not work. Use [0-9][0-9]* instead.
    %NDK%\ndk-build -C C:\MyProject\Android\jni 2>&1 | %SED% “s#:\([0-9][0-9]*\):#(\1):#” | %SED% “s#//jni#/jni#”

    And I am using Eclipse to compose and deploy the APK. My question is, is it possible to switch to vs-android for the C++ code, but continue using Eclipse to edit and debug and (optionally) deploy the Java code?

    Obviously, having to write the Java in VS would be a big step backward. I’m wondering what conflicts to expect, if any, since both vs-android and Eclipse want to build the APK.

  • jam says:

    Great work! It would be better that if someone could show how vs-android work with such as ‘Cocos2d-x’ or ‘irrlicht’ or ‘ogre3d’, thanks so much!

  • Vasilios Karagounis says:

    Hi Gavin, nice tool you have made.

    Is it possible to give me some details about dll (vs-android.Build.CPPTasks.Android.dll) and how to build one for visual studio 2015. I know it’s been a long time ago that you stopped updating “vs-android” but it is such a great tool that i would love to use.
    thank you

  • Leave a Reply

    Your email address will not be published. Required fields are marked *