title: How to debug sbt's failure "java.lang.NumberFormatException: For input string: "android-4"" upon loading Android project?
body: <p>I have an android project written in Scala and java using sbt 0.12.4. When I try to load it by sbt, I get an error:</p>
  
  <pre><code>$ sbt
  [info] Loading project definition from /Users/alex/Documents/projects/android/test2/my_project/project
  [error] java.lang.NumberFormatException: For input string: "android-4"
  [error] Use 'last' for the full log.
  Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
  </code></pre>
  
  <p>I searched for the string <code>android-4</code> but didn't find anything similar to it at all. And no other clues either. </p>
  
  <p>How do I find out where the error is? Or rather, how do I debug it?</p>
  
  <p><code>last</code> doesn't help:</p>
  
  <pre><code>Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? last
  [info] Loading project definition from /Users/alex/Documents/projects/android/test2/my_project/project
  [debug] Running task... Cancelable: false, check cycles: false
  [debug] 
  [debug] Initial source changes: 
  [debug]   removed:Set()
  [debug]   added: Set()
  [debug]   modified: Set()
  [debug] Removed products: Set()
  [debug] Modified external sources: Set()
  [debug] Modified binary dependencies: Set()
  [debug] Initial directly invalidated sources: Set()
  [debug] 
  [debug] Sources indirectly invalidated by:
  [debug]   product: Set()
  [debug]   binary dep: Set()
  [debug]   external source: Set()
  [debug] All initially invalidated sources: Set()
  [debug] Copy resource mappings: 
  [debug]   
  java.lang.NumberFormatException: For input string: "android-4"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:449)
    at java.lang.Integer.parseInt(Integer.java:499)
    at scala.collection.immutable.StringLike$class.toInt(StringLike.scala:231)
    at scala.collection.immutable.StringOps.toInt(StringOps.scala:31)
    at sbtandroid.AndroidPath$$anonfun$sbtandroid$AndroidPath$$determineBuildToolsVersion$2$$anonfun$2.apply(AndroidPath.scala:22)
    at sbtandroid.AndroidPath$$anonfun$sbtandroid$AndroidPath$$determineBuildToolsVersion$2$$anonfun$2.apply(AndroidPath.scala:22)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
    at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
    at scala.collection.mutable.ArrayOps.map(ArrayOps.scala:38)
    at sbtandroid.AndroidPath$$anonfun$sbtandroid$AndroidPath$$determineBuildToolsVersion$2.apply(AndroidPath.scala:22)
    at sbtandroid.AndroidPath$$anonfun$sbtandroid$AndroidPath$$determineBuildToolsVersion$2.apply(AndroidPath.scala:18)
    at scala.collection.IndexedSeqOptimized$class.foldl(IndexedSeqOptimized.scala:52)
    at scala.collection.IndexedSeqOptimized$class.reduceLeft(IndexedSeqOptimized.scala:69)
    at scala.collection.mutable.ArrayOps.reduceLeft(ArrayOps.scala:38)
    at sbtandroid.AndroidPath$.sbtandroid$AndroidPath$$determineBuildToolsVersion(AndroidPath.scala:18)
    at sbtandroid.AndroidPath$$anonfun$settings$5.apply(AndroidPath.scala:40)
    at sbtandroid.AndroidPath$$anonfun$settings$5.apply(AndroidPath.scala:40)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
    at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$single$1.apply(INode.scala:159)
    at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$single$1.apply(INode.scala:159)
    at sbt.EvaluateSettings$MixedNode.evaluate0(INode.scala:177)
    at sbt.EvaluateSettings$INode.evaluate(INode.scala:132)
    at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$submitEvaluate$1.apply$mcV$sp(INode.scala:64)
    at sbt.EvaluateSettings.sbt$EvaluateSettings$$run0(INode.scala:73)
    at sbt.EvaluateSettings$$anon$3.run(INode.scala:69)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)
  [error] java.lang.NumberFormatException: For input string: "android-4"
  [error] Use 'last' for the full log.
  Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p><img src="https://i.stack.imgur.com/OzEVq.png" alt="enter image description here"></p>