Android studio给了我很多隐藏方法的警告

pvabu6sv  于 2022-12-25  发布在  Android
关注(0)|答案(1)|浏览(1024)

我正在做一个Android项目,我得到了很多访问隐藏方法的警告,我不知道我做错了什么。我的应用程序工作正常,所以我真的不知道该怎么做才能删除这些警告。请帮助我,我真的不知道我应该做什么。我是一个初学者在Android,所以我真的不知道。

W/rackingmypantr: Accessing hidden method Ljava/lang/Thread;-><clinit>()V (blacklist, linking, denied)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->EMPTY_STACK_TRACE:[Ljava/lang/StackTraceElement; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->SUBCLASS_IMPLEMENTATION_PERMISSION:Ljava/lang/RuntimePermission; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->lock:Ljava/lang/Object; (greylist, linking, allowed)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->daemon:Z (greylist, linking, allowed)
    Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->threadLocals:Ljava/lang/ThreadLocal$ThreadLocalMap; (greylist, linking, allowed)
    Accessing hidden field Ljava/lang/Thread;->inheritableThreadLocals:Ljava/lang/ThreadLocal$ThreadLocalMap; (greylist, linking, allowed)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->nextThreadNum()I (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->nextThreadNum()I (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->init(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;J)V (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/security/AccessControlContext;)V (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->nextThreadNum()I (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->init(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;J)V (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->nextThreadNum()I (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->init(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;J)V (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden method Ljava/lang/Thread;->init(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;J)V (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->init(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;J)V (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden method Ljava/lang/Thread;-><init>(Ljava/lang/ThreadGroup;Ljava/lang/String;IZ)V (greylist, linking, allowed)
    Accessing hidden field Ljava/lang/Thread;->stillborn:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->group:Ljava/lang/ThreadGroup; (greylist, linking, allowed)
    Accessing hidden method Ljava/lang/ThreadGroup;->addUnstarted()V (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->auditSubclass(Ljava/lang/Class;)Z (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread$1;-><init>(Ljava/lang/Class;)V (blacklist, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->exit()V (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/ThreadGroup;->threadTerminated(Ljava/lang/Thread;)V (greylist, linking, allowed)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->target:Ljava/lang/Runnable; (greylist, linking, allowed)
    Accessing hidden field Ljava/lang/Thread;->inheritedAccessControlContext:Ljava/security/AccessControlContext; (greylist, linking, allowed)
    Accessing hidden field Ljava/lang/Thread;->blocker:Lsun/nio/ch/Interruptible; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->uncaughtExceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/ThreadGroup;->systemThreadGroup:Ljava/lang/ThreadGroup; (greylist, linking, allowed)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->defaultUncaughtExceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->getNativeTid()I (blacklist, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->getUncaughtExceptionPreHandler()Ljava/lang/Thread$UncaughtExceptionHandler; (greylist,core-platform-api, linking, allowed)
    Accessing hidden field Ljava/lang/Thread;->uncaughtExceptionPreHandler:Ljava/lang/Thread$UncaughtExceptionHandler; (greylist, linking, allowed)
    Accessing hidden method Ljava/lang/Thread;->init(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;J)V (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->init(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;JLjava/security/AccessControlContext;)V (blacklist, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->init(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;JLjava/security/AccessControlContext;)V (blacklist, linking, denied)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->name:Ljava/lang/String; (greylist, linking, allowed)
    Accessing hidden method Ljava/lang/ThreadGroup;->addUnstarted()V (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden method Ljava/lang/Thread;->init2(Ljava/lang/Thread;)V (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->contextClassLoader:Ljava/lang/ClassLoader; (greylist, linking, allowed)
W/rackingmypantr: Accessing hidden method Ljava/lang/ThreadLocal;->createInheritedMap(Ljava/lang/ThreadLocal$ThreadLocalMap;)Ljava/lang/ThreadLocal$ThreadLocalMap; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->interrupt0()V (blacklist, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->isCCLOverridden(Ljava/lang/Class;)Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread$Caches;->subclassAuditsQueue:Ljava/lang/ref/ReferenceQueue; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread$Caches;->subclassAudits:Ljava/util/concurrent/ConcurrentMap; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->processQueue(Ljava/lang/ref/ReferenceQueue;Ljava/util/concurrent/ConcurrentMap;)V (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden method Ljava/lang/Thread;->nativeCreate(Ljava/lang/Thread;JZ)V (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->nativeGetStatus(Z)I (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->nextThreadID()J (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->threadSeqNumber:J (greylist, linking, allowed)
    Accessing hidden method Ljava/lang/Thread;->nextThreadNum()I (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->threadInitNumber:I (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->threadInitNumber:I (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->processQueue(Ljava/lang/ref/ReferenceQueue;Ljava/util/concurrent/ConcurrentMap;)V (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->defaultUncaughtExceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->setNativeName(Ljava/lang/String;)V (blacklist, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->setPriority0(I)V (blacklist, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->setUncaughtExceptionPreHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)V (greylist-max-o,core-platform-api, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->sleep(Ljava/lang/Object;JI)V (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->sleep(Ljava/lang/Object;JI)V (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->blockedOn(Lsun/nio/ch/Interruptible;)V (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blocker:Lsun/nio/ch/Interruptible; (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden method Ljava/lang/Thread;->dispatchUncaughtException(Ljava/lang/Throwable;)V (greylist, linking, allowed)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->tid:J (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->priority:I (greylist, linking, allowed)
W/rackingmypantr: Accessing hidden method Ldalvik/system/VMStack;->getThreadStackTrace(Ljava/lang/Thread;)[Ljava/lang/StackTraceElement; (greylist, linking, allowed)
    Accessing hidden field Llibcore/util/EmptyArray;->STACK_TRACE_ELEMENT:[Ljava/lang/StackTraceElement; (blacklist, linking, denied)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->nativeGetStatus(Z)I (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->uncaughtExceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->uncaughtExceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blockerLock:Ljava/lang/Object; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->blocker:Lsun/nio/ch/Interruptible; (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->interrupt0()V (blacklist, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->interrupt0()V (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->nativePeer:J (greylist, linking, allowed)
    Accessing hidden method Ljava/lang/Thread;->setNativeName(Ljava/lang/String;)V (blacklist, linking, denied)
    Accessing hidden method Ldalvik/system/RuntimeHooks;->getThreadPrioritySetter()Ldalvik/system/ThreadPrioritySetter; (blacklist,core-platform-api, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->setSystemDaemon(Z)V (blacklist, linking, denied)
W/rackingmypantr: Accessing hidden field Ljava/lang/Thread;->systemDaemon:Z (blacklist, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->uncaughtExceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler; (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/ThreadGroup;->add(Ljava/lang/Thread;)V (greylist, linking, allowed)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->stackSize:J (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/Thread;->nativeCreate(Ljava/lang/Thread;JZ)V (greylist-max-o, linking, denied)
    Accessing hidden field Ljava/lang/Thread;->started:Z (greylist-max-o, linking, denied)
    Accessing hidden method Ljava/lang/ThreadGroup;->threadStartFailed(Ljava/lang/Thread;)V (greylist-max-o, linking, denied)
    Accessing hidden method Ldalvik/system/DexPathList;-><init>(Ljava/lang/ClassLoader;Ljava/lang/String;)V (blacklist, linking, denied)
    Accessing hidden field Ldalvik/system/DexPathList;->definingContext:Ljava/lang/ClassLoader; (greylist, linking, allowed)
    Accessing hidden method Ldalvik/system/DexPathList;->splitPaths(Ljava/lang/String;Z)Ljava/util/List; (greylist, linking, allowed)
W/rackingmypantr: Accessing hidden field Ldalvik/system/DexPathList;->nativeLibraryDirectories:Ljava/util/List; (greylist, linking, allowed)
    Accessing hidden field Ldalvik/system/DexPathList;->systemNativeLibraryDirectories:Ljava/util/List; (greylist, linking, allowed)
    Accessing hidden method Ldalvik/system/DexPathList;->getAllNativeLibraryDirectories()Ljava/util/List; (blacklist, linking, denied)
    Accessing hidden method Ldalvik/system/DexPathList;-><init>(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)V (greylist, linking, allowed)
    Accessing hidden method Ldalvik/system/DexPathList;-><init>(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Z)V (greylist-max-o, linking, denied)
    Accessing hidden method Ldalvik/system/DexPathList;-><init>(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Z)V (greylist-max-o, linking, denied)
    Accessing hidden method Ldalvik/system/DexPathList;->splitDexPath(Ljava/lang/String;)Ljava/util/List; (greylist-max-o, linking, denied)
W/rackingmypantr: Accessing hidden method Ldalvik/system/DexPathList;->concat(Ljava/lang/Class;[Ljava/lang/Object;[Ljava/lang/Object;)[Ljava/lang/Object; (blacklist, linking, denied)
    Accessing hidden method Ldalvik/system/DexPathList;->getAllNativeLibraryDirectories()Ljava/util/List; (blacklist, linking, denied)
    Accessing hidden method Ldalvik/system/DexPathList;->lambda$initByteBufferDexPath$0(Ljava/nio/ByteBuffer;)Z (blacklist, linking, denied)
    Accessing hidden method Ldalvik/system/DexPathList;->loadDexFile(Ljava/io/File;Ljava/io/File;Ljava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ldalvik/system/DexFile; (greylist, linking, allowed)
    Accessing hidden method Ldalvik/system/DexFile;-><init>(Ljava/io/File;Ljava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)V (greylist-max-o, linking, denied)
jjhzyzn0

jjhzyzn01#

Accessing hidden field警告表示您的应用正在使用某些受限的非SDK接口。
从Android 9(API级别28)开始,平台会限制应用可以使用的非SDK接口。只要应用引用非SDK接口或尝试使用反射或JNI获取其句柄,这些限制就会适用。设置这些限制的目的是帮助改善用户和开发人员体验,降低用户崩溃和开发人员紧急部署的风险。
document提供了有关此主题的全面说明,并提供了有关如何解决这些问题的指导:
虽然您目前可以使用一些非SDK接口(取决于应用的目标API级别),使用任何非SDK方法或字段始终存在破坏应用的高风险。如果应用依赖非SDK接口,则应开始计划迁移到SDK接口或其他替代方案。如果无法找到替代方案,以针对应用中的某项功能使用非SDK接口,您应该请求一个新的公共API。

相关问题