Android 11 修改libcore update-api 遇到的问题
1. 变量类型不能为short
error:Should avoid ood sized primitives;use 'int' instead of 'short' in parameter MkeyOffeset in java.crypt.Cipher. setIdeamKey(int KeyIndex,byte[] Mkey, short MkeyOffset, int intMkeyLen, int KeyType) [NoByteOrShort]
解决办法:把short改成int
2.方法名称规范要求 驼峰命名法
error: Acronyms should not be capitalized in method names: was `getChipSN`, should this be `getChipSn`? [AcronymName]
解决办法:把getChipSN改成getChipSn
3.缺少 非空判断@NonNull
error:Missing nullability on parameter `SNBuf` in method `getChipSN` [MissingNullability]
解决办法:
import android.annotation.NonNull;
@NonNull byte[] SNBuf
make api-stubs-docs-non-updatable
make api-stubs-docs-non-updatable-update-current-api
make api-stubs-docs-update-current-api
make update-api
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
