Android下新增api编译问题

来源:互联网 发布:松下tda600编程软件 编辑:程序博客网 时间:2024/04/27 22:06

Android下新增api编译问题

    当我们对framework/base/下新增aidl,也就是新增向上api的时候,编译容易出现以下的错误:


frameworks/base/api/system-current.txt:25031: error 8: Removed public class android.os.IXxxService
frameworks/base/api/system-current.txt:25036: error 8: Removed public class android.os.IXxxService.Stub
out/target/common/obj/PACKAGING/system-api.txt:25035: error 3: Added class IXxxService to package android.os
out/target/common/obj/PACKAGING/system-api.txt:25040: error 3: Added class IXxxService.Stub to package android.os

这是因为新增或者修改的api没有及时同步到/frameworks/base/api/system-current.txt文件中,这个时候编译会失败。还有有以下的提示:

******************************
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.
******************************

这个时候我们就需要先执行:

# make update-api

进行同步,再对代码进行编译便可解决上面的问题。


0 0
原创粉丝点击