编译android出错

本文详细介绍了在Android开发中遇到的API变更错误,特别是关于添加了IHelloService类到android.os包所引发的问题。提供了两种解决方案:一是通过添加@hide注释隐藏API变更,二是更新current.txt文件并通过审批流程。同时,文中提到了使用make update-api命令来处理此类错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

注意:frameworks/base/nfc-extras/java/com/android/nfc_extras/NfcAdapterExtras.java 使用了未经检查或不安全的操作。
注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。
target Java: send_bug (out/target/common/obj/JAVA_LIBRARIES/send_bug_intermediates/classes)
Checking API: checkapi-last
Checking API: checkapi-current
host Java: layoutlib (out/host/common/obj/JAVA_LIBRARIES/layoutlib_intermediates/classes)
out/target/common/obj/PACKAGING/public_api.txt:15788: error 3: Added class IHelloService to package android.os
out/target/common/obj/PACKAGING/public_api.txt:15793: error 3: Added class IHelloService.Stub to package android.os

******************************
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: *** [out/target/common/obj/PACKAGING/checkapi-current-timestamp] 错误 38
make: *** 正在等待未完成的任务....
注意:某些输入文件使用或覆盖了已过时的 API。
注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
root@phone-desktop:/opt/FriendlyARM/tiny4412/android/android-4.1.2#

(个人感觉,应该是因为添加老罗jni层后引起的错误)

解决方法:make update-api

2

make:进入目录'/opt/FriendlyARM/tiny4412/android/android-4.1.2'
make: 没有什么可以做的为 `all_modules'。
make:离开目录“/opt/FriendlyARM/tiny4412/android/android-4.1.2”

该问题说明已经编译过了

 

转载于:https://www.cnblogs.com/Ph-one/p/4334232.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值