android编译错误

android编译错误遇到:

[  0% 9/10750] Checking API:  checktestapi-current
FAILED: /bin/bash -c "(( out/host/linux-x86/bin/apicheck -JXmx1024m -J\"classpath /usr/lib/jvm/java-8-openjdk-amd64/bin/../lib/tools.jar:out/host/linux-x86/framework/doclava.jar:out/host/linux-x86/framework/jsilver.jar\"  -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 -error 25 -error 26 -error 27  frameworks/base/api/test-current.txt  out/target/common/obj/PACKAGING/test-api.txt  frameworks/base/api/test-removed.txt  out/target/common/obj/PACKAGING/test-removed.txt || (  cat build/core/apicheck_msg_current.txt ; exit 38 ) ) ) && (mkdir -p out/target/common/obj/PACKAGING/ ) && (touch out/target/common/obj/PACKAGING/checktestapi-current-timestamp )"
out/target/common/obj/PACKAGING/test-api.txt:19818: error 17: Field android.media.AudioManager.ADJUST_LOWER has changed value from -1 to -10
out/target/common/obj/PACKAGING/test-api.txt:19820: error 17: Field android.media.AudioManager.ADJUST_RAISE has changed value from 1 to 10

******************************
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 按照编译错误提示智行,然后Make还是一样的错误

参考博客:https://blog.csdn.net/offenhwang/article/details/97117601

  1. rm out/target/common/docs/system-api-stubs-timestamp

  2. rm out/target/common/docs/api-stubs-timestamp

rm out/target/common/obj/PACKAGING/checksystemapi-current-timestamp
rm out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp
rm out/target/common/obj/PACKAGING/checkpublicapi-last-timestamp
rm out/target/common/obj/PACKAGING/checksystemapi-last-timestamp
rm out/target/common/obj/PACKAGING/public_api.txt
rm out/target/common/obj/PACKAGING/system-api.txt
rm out/target/common/obj/PACKAGING/system-removed.txt
rm out/target/common/obj/PACKAGING/removed.txt
 

还是不行

最后make clean  && make  没办法了呀!

发布了25 篇原创文章 · 获赞 0 · 访问量 1022

猜你喜欢

转载自blog.csdn.net/jlgcumt/article/details/103406232