本文主要是介绍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
这篇关于Android 11 修改libcore update-api 遇到的问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!