我想获取签名数组,这是PackageInfo的一个字段。
我的C ++代码是(LOGD是一个用于记录的宏):
jclass PackageInfoClass = pEnv->FindClass("android/content/pm/PackageInfo");
if(PackageInfoClass == NULL) {
LOGD("class PackageInfoClass not found");
abort();
}
LOGD("class PackageInfoClass found");
jfieldID SignaturesFieldID = pEnv->GetFieldID(PackageInfoClass, "signatures",
"[Landroid.content.pm.Signature;");
if(SignaturesFieldID == NULL) {
LOGD("field SignaturesFieldID not found");
abort();
}
LOGD("field SignaturesFieldID found");
在我的日志中,我收到消息“字段SignaturesFieldID not found”