Couldn't parse API file “frameworks/base/api/current.txt”

2,929 views
Skip to first unread message

Ankit Awasthi

unread,
Feb 3, 2013, 5:00:12 AM2/3/13
to android-...@googlegroups.com
I tried adding some files in Android framework. Everything goes well, had lost of errors, solved them out , except in the end of compilation i am getting below error.  I tried make update-api too, but no luck, every time in compilation it is giving below errors.  below is log if anyone can help me out it will be great



Docs droiddoc: out/target/common/docs/doc-comment-check
Checking API: checkapi-last
Checking API: checkapi-current
host layoutlib_create: out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar
Couldn't parse API file "frameworks/base/api/current.txt"
  ...as text: com.google.doclava.apicheck.ApiParseException: missing class or interface. got: private line 6342
  ...as XML:  com.google.doclava.apicheck.ApiParseException: Error parsing API
Couldn't parse API file "out/target/common/obj/PACKAGING/public_api.txt"
  ...as text: com.google.doclava.apicheck.ApiParseException: missing class or interface. got: private line 6342
  ...as XML:  com.google.doclava.apicheck.ApiParseException: Error parsing API
Exception in thread "main" java.lang.NullPointerException
    at com.google.doclava.apicheck.ApiCheck.checkApi(ApiCheck.java:118)
    at com.google.doclava.apicheck.ApiCheck.main(ApiCheck.java:67)

******************************
You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:
   1) You can add "@hide" javadoc comments to the methods, etc. listed in the
      errors above.

   2) You can update current.txt by executing the following command:
         make update-api

      To submit the revised current.txt to the main Android repository,
      you will need approval.
******************************



Couldn't parse API file "out/target/common/obj/PACKAGING/public_api.txt"
  ...as text: com.google.doclava.apicheck.ApiParseException: missing class or interface. got: private line 6342
  ...as XML:  com.google.doclava.apicheck.ApiParseException: Error parsing API
Exception in thread "main" java.lang.NullPointerException
    at com.google.doclava.apicheck.ApiInfo.isConsistent(ApiInfo.java:60)
    at com.google.doclava.apicheck.ApiCheck.checkApi(ApiCheck.java:118)
    at com.google.doclava.apicheck.ApiCheck.main(ApiCheck.java:67)

******************************
You have tried to change the API from what has been previously released in
an SDK.  Please fix the errors listed above.
******************************


make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp] Error 38
make: *** Waiting for unfinished jobs....
make: *** [out/target/common/obj/PACKAGING/checkapi-current-timestamp] Error 38
-rw-r--r-- 1 aankit admin 9763299 Jan 31 14:21 out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar
Output: out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar
Input :      out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar
Input :      out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar
Found 7983 classes in input JARs.
Found 2260 classes to keep, 2143 class dependencies.
# deps classes: 2143
# keep classes: 2260
# renamed     : 19
Created JAR file out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar

KaPiL.rIcKy

unread,
Feb 3, 2013, 10:11:39 AM2/3/13
to android-...@googlegroups.com

Have u tried make update-api ?

Sent from Samsung Galaxy S2

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To post to this group, send email to android-...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

A N K ! T

unread,
Feb 3, 2013, 10:21:37 AM2/3/13
to android-...@googlegroups.com
Yes above log is what i get after doing make update-api then make -j4.  before that it was showing something like

Couldn't parse API file "out/target/common/obj/PACKAGING/public_api.txt" after make update-api it is showing
Couldn't parse API file "frameworks/base/api/current.txt" .


basically make update-api adding changes in current.txt which was in "public_api.txt" untill i do make update-api.

--
Thanks & Regards,
Ankit Awasthi 

KaPiL.rIcKy

unread,
Feb 3, 2013, 10:15:15 PM2/3/13
to android-...@googlegroups.com

Yury Zhauniarovich

unread,
Feb 5, 2013, 10:33:36 AM2/5/13
to android-...@googlegroups.com
I think the author has already seen the answer ) http://stackoverflow.com/questions/14622020/couldnt-parse-api-file-frameworks-base-api-current-txt

On Monday, February 4, 2013 8:24:14 PM UTC+1, George Leon wrote:
In Private.txt at line line 6342 you will find what exactly is causing the error. 

 If you checkexternal/doclava/src/com/google/doclava/apicheck/ApiFile.java you'll find the the throw statement that can help you:

throw new ApiParseException("missing class or interface. got: " + token, tokenizer.getLine());

It seems that you try to add to api private class or interface that is not allowed. To check this try to look into out/target/common/obj/PACKAGING/public_api.txt file line number 6342. There you should find the name of the class or interface that causes the error.

A N K ! T

unread,
Feb 5, 2013, 11:54:29 AM2/5/13
to android-...@googlegroups.com
Yes, Thanks Yury :) , it helped a lot.


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To post to this group, send email to android-...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages