构建修改后的AOSP会引发错误(尝试更改API)

时间:2013-03-09 17:32:19

标签: api build hide android-source

out/target/common/obj/PACKAGING/public_api.txt:4316: error 5: Added public field android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_MOVEMENT


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

所以我试着在我的成员变量中添加@hide注释,但它只会给我一个错误:

frameworks/base/core/java/android/app/admin/DevicePolicyManager.java:233: cannot find symbol
symbol  : class hide
location: class android.app.admin.DevicePolicyManager
    @hide

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:6)

我犯了使用@hide@Override的错误,但您必须在JavaDoc评论中使用它:

/**
  * @hide
  */