title: How to develop legacy Android app (api>=10) with android studio?
body: <p>I'm trying to develop an app for my (very) old Android phone with Gingerbread, api 10.</p>
  
  <p>But with android studio as IDE the problems seem to go on forever:</p>
  
  <ul>
  <li>in project wizard, only api>=14 is supported</li>
  <li>so I choose 14 and want to change later on</li>
  <li>I change minSdkVersion in build.gradle(:app) to 10 -> <code>minSdkVersion 10 cannot be smaller than version 14 declared in library</code></li>
  <li>so I change <code>implementation 'com.android.support:appcompat-v7:26.1.0'</code> to <code>implementation 'com.android.support:appcompat-v7:25.1.0'</code></li>
  <li>I get errors¹ that some generated gradle chache files "values-v14.xml" are missing ressources  </li>
  </ul>
  
  <p>…and that's the point I don't know how to go on</p>
  
  <p>As I thought, it can't be true, a project throws that manny errors, and I did not create a single class and did not write a single line of code, I tried building from commandline.</p>
  
  <p>It works, but I got used to IDE-features and don't like missing them. So my question is:</p>
  
  <p>How to develop a legacy android app for api levels down to 10 with android studio?<br>
  Is there a guide to go on fitting the project to api 10?  </p>
  
  <p>Was I on the "right" path at all?    </p>
  
  <p>Is there maybe a skeleton-project for a api level 10 app, which I could import (as if I could choose  api 10 in project wizard)?  </p>
  
  <p>I am aware of the reasons, Google doesn't support api&lt;14 anymore.  </p>
  
  <p>Still I don't see why I shouldn't be able to use my perfectly healthy hardware.<br>
  And still would I like to be able to write a simple app for my old phone.</p>
  
  <p>¹ error log:</p>
  
  <pre><code>Information:Gradle tasks [:app:assembleDebug]
  /home/aik/.gradle/caches/transforms-1/files-1.1/appcompat-v7-25.1.0.aar/2ab2d76d88a035b2d8a733b1b9a020a8/res/values-v14/values-v14.xml
  Error:(8, 5) error: style attribute 'android:attr/textAllCaps' not found.
  Error:resource android:style/TextAppearance.Material not found.
  Error:resource android:style/TextAppearance.Material.Body1 not found.
  Error:resource android:style/TextAppearance.Material.Body2 not found.
  /home/aik/test_api10/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v14/values-v14.xml
  Error:(5) style attribute 'android:attr/textAllCaps' not found.
  Error:resource android:style/TextAppearance.Material.Button not found.
  Error:resource android:style/TextAppearance.Material.Caption not found.
  Error:resource android:style/TextAppearance.Material.Display1 not found.
  Error:resource android:style/TextAppearance.Material.Display2 not found.
  Error:resource android:style/TextAppearance.Material.Display3 not found.
  Error:resource android:style/TextAppearance.Material.Display4 not found.
  Error:resource android:style/TextAppearance.Material.Headline not found.
  Error:resource android:style/TextAppearance.Material.Inverse not found.
  Error:resource android:style/TextAppearance.Material.Large not found.
  /home/aik/test_api10/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v11/values-v11.xml
  Error:(6) error: resource android:attr/textColorHighlightInverse not found.
  Error:(7) error: resource android:attr/textColorLinkInverse not found.
  Error:(12) error: resource android:attr/textColorHighlightInverse not found.
  Error:(13) error: resource android:attr/textColorLinkInverse not found.
  Error:resource android:style/TextAppearance.Material.Large.Inverse not found.
  Error:resource android:style/TextAppearance.Material.Widget.PopupMenu.Large not found.
  Error:resource android:style/TextAppearance.Material.Widget.PopupMenu.Small not found.
  Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
  Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
  Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
  Error:Execution failed for task ':app:processDebugResources'.
  &gt; Failed to execute aapt
  Information:BUILD FAILED in 10s
  Information:25 errors
  Information:0 warnings
  Information:See complete output in console
  </code></pre>
  
  <p><strong>EDIT</strong>
  I modified my gradle:app to match with the one from ישו אוהב אותך's skeleton-project. I did have to change compileSdkVersion, targetSdkVersion and androidTestImplementation in addition to my tries mentioned above. File looks like this now:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 25
      defaultConfig {
          applicationId "dj.kai.test_api10"
          minSdkVersion 10
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:25.4.0'
      implementation 'com.android.support.constraint:constraint-layout:1.0.2'
      testImplementation 'junit:junit:4.12'
  
      // this is the last support test for api &gt;= 9
      androidTestImplementation 'com.android.support.test:runner:1.0.0'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.0'
  }
  </code></pre>