我正在使用AOSP源文件。我已经在Android 9中创建了一个新服务,并且它正在运行。当我尝试在Android 11中重用相同的服务时,从自动生成的文件(out文件夹)中获得API Lint错误。
1. IHelloworldService.java:43: 错误:调用系统API的方法应将RemoteException重新抛出为RuntimeException(但不在throws子句中列出)[RethrowRemoteException]
2. IHelloworldService.java:15: 错误:原始AIDL接口不能暴露:Stub扩展Binder [RawAidl]
3. IHelloworldService.java:10: 错误:缺少nullability on method asBinder return [MissingNullability]
1. IHelloworldService.java:43: 错误:调用系统API的方法应将RemoteException重新抛出为RuntimeException(但不在throws子句中列出)[RethrowRemoteException]
2. IHelloworldService.java:15: 错误:原始AIDL接口不能暴露:Stub扩展Binder [RawAidl]
3. IHelloworldService.java:10: 错误:缺少nullability on method asBinder return [MissingNullability]
我无法尝试终端中发出的内容(方法1不可行,因为是自动生成的文件;方法2不可行,因为提到的文件夹不存在)
有人能帮我解决这个问题吗?已经卡了很长时间了。