title: android different build versions
body: <p>I have a android app that I'm building in android 2.1. But the time has come to switch to a bigger build. What is the best way to support 2 or more android build versions.
  I had some suggestions like:</p>
  
  <ol>
  <li>Using git branches for the 2 builds </li>
  <li>Making the native, first 2.1 app a library project and creating two separate project that will use the library's common classes but
  rewrite all of the controllers</li>
  <li><p>Use the library project, two separate project for the different build and whan I have to use a class from the specific build I will
  have to  call something like this from the library project:</p>
  
  <pre><code>Class&lt;ExpandableListAdapter&gt; adapterClass = Config.getHotelDistrictAdapterClass();
          hotelAdapter = adapterClass.getConstructor(String.class).newInstance(HotelDistrictListActivity.this,
  </code></pre>
  
  <p>0, hotelList.size(), hotelList,
                      cretedFromAssets);</p>
  
  <p>where the Config class will counsult a config file that is contained
  in the build versions  and contains the class name for the specific
  build.</p>
  
  <p>So the scenario will go somothin like this: the lib project will
  call on the Config class then the config class will call on a config
  file in the current build(4.2 or 2.1), the config file will return
  the class name and the Config class will return the class to the lib
  Project and the Lib Project will instanciate the class with the code
  :</p>
  
  <p>hotelAdapter =
  adapterClass.getConstructor(String.class).newInstance(HotelDistrictListActivity.this,
  0, hotelList.size(), hotelList,cretedFromAssets);</p></li>
  </ol>
  
  <p>Please suggest what is the better or best way to maintain two separate builds for two android versions, or suggest the way that you use to maintain two ore more android builds.
  Thanks</p>