title: Building Android AOSP fails after adding new API as there are new APIs than the previous SDK release. How to fix this?
body: <p>I am adding a new API in Android input layer. I am getting an error while building aosp due to new API available than the previous SDK release. How to fix this?</p>
  
  <p>I have copied the error below:</p>
  
  <hr>
  
  <p>Checking API: checkpublicapi-last
  java -Xmx1024m -classpath /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin//javac:out/host/linux-x86/framework/doclava.jar:out/host/linux-x86/framework/jsilver.jar com.google.doclava.apicheck.ApiCheck -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 prebuilts/sdk/api/22.txt out/target/common/obj/PACKAGING/public_api.txt frameworks/base/api/removed.txt out/target/common/obj/PACKAGING/removed.txt</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/javadoc/ClassDoc
          at com.google.doclava.apicheck.ApiFile.parsePackage(ApiFile.java:97)
          at com.google.doclava.apicheck.ApiFile.parseApi(ApiFile.java:76)
          at com.google.doclava.apicheck.ApiCheck.parseApi(ApiCheck.java:144)
          at com.google.doclava.apicheck.ApiCheck.checkApi(ApiCheck.java:112)
          at com.google.doclava.apicheck.ApiCheck.main(ApiCheck.java:67)
  Caused by: java.lang.ClassNotFoundException: com.sun.javadoc.ClassDoc
          at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          ... 5 more
  </code></pre>
  
  <hr>
  
  <p>You have tried to change the API from what has been previously released in
  an SDK.  Please fix the errors listed above.</p>
  
  <hr>
  
  <p>make: *** [out/target/common/obj/PACKAGING/checkpublicapi-last-timestamp] Error 38</p>
  
  <hr>