Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6216603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:16:39+00:00 2026-05-24T07:16:39+00:00

I’m porting a native C++ engine to Android NDK. After trying some environments and

  • 0

I’m porting a native C++ engine to Android NDK.
After trying some environments and tools, I found the latest vs-android (0.9) to be the most comfortable.
I do have a few problems with it (some I may need to ask in future questions), but for now – here’s one:

The native engine compiles to a native shared library. We want the engine to be android-8 API compatible (android 2.2).

We have a few tester applications we use internally. I’ve ported one of them to Android as well, but since I’m using native activity (and native app glue on top of that), it requires android-9 (2.3).

I have some module projects – static libraries – which are used in both the engine and the tester app. I need these to compile to android-8 for the engine, and to android-9 for the tester.
In addition to all of that, we want to support both arm5 and arm7.

With the ndk build scripts I can do this fairly easily. In MS-Build (which vs-android uses) it seems to require an exponential number of configurations (don’t forget about debug/profile/release).

Is there a way to do this without creating all these configurations? Such that when I build my engine, for example, it will compile the modules for android-8, and for both arm5 and arm7, and when I build the tester it will compile the modules for android-9 and for arm5 and arm7, without creating 4 almost identical configurations for each project and for debug,profile,release?

I found this, but I’m not sure how to use it and if it’s possible to apply the technique of parent/child projects here.

(Telling me to ‘stop being lazy and just create the configurations, despite the fact that whenever you want to change the parameter you’ll have to change it in all configurations’ is acceptable as a comment, but please – not as an answer. Same goes for ‘use ndk-build and manually build your apk instead of using vs-android’).

Thanks!

(BTW, can someone please add a vs-android tag?)

EDIT:
I came up with a partial solution – only to the API level issue. See my answer below.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:16:39+00:00Added an answer on May 24, 2026 at 7:16 am

    OK, here’s a partial solution I’ve found (since no one else has come up with another answer).

    This is regarding the API level issue. It will also work for anything that is solution-specific.
    Specifically for my problem –
    For each project (all the static libs, the engine shared lib and the tester shared lib), I added the following to the project file:

      <Import Condition="Exists('$(SolutionDir)AndroidSolution.props')" Project="$(SolutionDir)AndroidSolution.props" />
    

    And then, each solution can determine the parameters it needs for all of its projects by adding a file called ‘AndroidSolution.props’ to the same folder as the solution file.
    A sample props file:

    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <PropertyGroup>
        <AndroidAPILevel>android-8</AndroidAPILevel>
        <!-- <AndroidArch>armv7-a</AndroidArch> -->
      </PropertyGroup>
    </Project>
    

    That way the API level is determined for all the projects in the solution, and they can change for different solutions.

    As for the multiple ABI’s, I added the following to the XML:

    <AndroidArch>__ANDROID_ARCHITECTURE__</AndroidArch>
    <PlatformToolset>__PLATFORM_TOOLSET__</PlatformToolset>
    

    And used a short script (which is called multiple times before each msbuild execution) to replace both parameters in the build script

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.