Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building modified AOSP throws error (Trying to change API)

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

So i tried to add an @hide annotation to my member variable, but it will only give me another error:

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

How can I solve this problem?

like image 372
4ndro1d Avatar asked Mar 09 '13 17:03

4ndro1d


1 Answers

I made the mistake of using @hide such as @Override, but you have to use it in a JavaDoc comment:

/**
  * @hide
  */
like image 70
4ndro1d Avatar answered Nov 11 '22 17:11

4ndro1d