android学习日记:利用反射调用隐藏API

这篇博客详细记录了如何使用反射调用Android中被@hide注解的隐藏API。首先,通过Class.forName获取目标类,然后使用getDeclaredMethod找到特定方法,确保参数类型与原方法一致。设置方法可访问后,通过invoke执行方法。文中还提到,如果需要调用隐藏类,可以通过newInstance创建类实例并执行方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近用到了反射,最后虽然做到了,不过感觉网上相关的介绍都不是很清楚,就自己总结了下。

反射调用一个@hide的方法:

例如android.widget.AutoCompleteTextView包下面的setDropDownAlwaysVisible函数,这个函数在源码中是被hide掉的,调用的时候肯定要先获得一个AutoCompleteTextView的具体对象,所以这个对象也要在反射的时候被指定。

主要的反射函数:

public Object setDropDownAlwaysVisible(AutoCompleteTextView data,boolean b) throws 
	ClassNotFoundException, NoSuchMethodException, IllegalAccessException, 
	IllegalArgumentException, InvocationTargetException{
		Object[] params = new Object[1];
		params[0] = b;
		Class ownerClass = Class.forName("android.widget.AutoCompleteTextView");
		Log.i(TAG,"ownerclass is "+ownerClass);
		Class[] args= new Class[1];
		args[0] = boolean.class;
		Method method = ownerClass.getDeclaredMethod("setDropDownAlwaysVisible", args);
		Log.i(TAG,"method is "+method);
		method.setAccessible(true);
		Log.i(TAG,"data is "+data+"\nb is "+b);
		return method.invoke(data, b);
	}


反射的机制大概就是,先根据类的名字找到具体的类,然后再进入这个类中,依据特定的方法名和特定的参数类型信息来定位这个类中的具体方法(很多时候一个类里同名不同参的方法有好几个)。最后通过method.invoke来将这个方法加载到具体的类里。

这个反射函数的返回值类型是Object,可以转化成各种想要的类型(String,int等,转换方法度娘上有很多)。

首先要找到我们需要反射方法的类中,代码就是Class ownerClass = Class.forName("android.widget.AutoCompleteTextView"); 方法不止forName这一种。

然后通过得到的ownerClass来找具体的方法:Method method = ownerClass.getDeclaredMethod("setDropDownAlwaysVisible", args); 第一个参数是方法的名字(不含参数,只是名字)。第二个参数args是一个类型数组,包含了这个函数所有的参数类型,例子中的类型是boolean(我当时写成了Boolean,运行出现问题。。。),注意的是这个boolean.class一定要和原方法中的数据类型一模一样,顺序也要一样,不然会定位不到这个方法。如果函数没有参数,可以直接class[] args=null。

得到method的之后将之设为可以Access,然后就可以装载了。

装载函数:method.invoke(data, b); 这行代码会返回一个Object类型。参数data是你想装载到的类名字(类型是object)。参数b是你需要在data中传入这个method的参数。

最后,具体在代码中的调用:

AutoCompleteTextView view = (AutoCompleteTextView)findViewById(R.id.ac);
				try {
					setDropDownAlwaysVisible(view, false);
				} catch (Exception e){
					e.printStackTrace();
				}


当代码中不需要实例化类,或者要调用隐藏类中的方法的时候,只需要在反射函数中new一个class即可。

例如:Class ownerClass = Class.forName("android.content.res.AssetManager");
  Object newclass = ownerClass.newInstance();

然后最后将方法invoke到这个newclass上即可实现调用。

未完待续

--------- beginning of main --------- beginning of system 2025-06-05 19:19:52.875 2778-2778 Zygote com.example.diaryapp I seccomp disabled by setenforce 0 2025-06-05 19:19:52.876 2778-2778 xample.diaryap com.example.diaryapp I Late-enabling -Xcheck:jni 2025-06-05 19:19:52.893 2778-2778 xample.diaryap com.example.diaryapp W Unexpected CPU variant for X86 using defaults: x86_64 2025-06-05 19:19:53.227 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden field Landroid/os/Trace;->TRACE_TAG_APP:J (light greylist, reflection) 2025-06-05 19:19:53.227 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (light greylist, reflection) 2025-06-05 19:19:53.258 2778-2778 AppCompatDelegate com.example.diaryapp D Checking for metadata for AppLocalesMetadataHolderService : Service not found 2025-06-05 19:19:53.273 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking) 2025-06-05 19:19:53.273 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking) 2025-06-05 19:19:53.273 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking) 2025-06-05 19:19:53.273 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking) 2025-06-05 19:19:53.293 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection) 2025-06-05 19:19:53.294 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection) 2025-06-05 19:19:53.298 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/graphics/FontFamily;-><init>()V (light greylist, reflection) 2025-06-05 19:19:53.298 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/graphics/FontFamily;->addFontFromAssetManager(Landroid/content/res/AssetManager;Ljava/lang/String;IZIII[Landroid/graphics/fonts/FontVariationAxis;)Z (light greylist, reflection) 2025-06-05 19:19:53.298 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/graphics/FontFamily;->addFontFromBuffer(Ljava/nio/ByteBuffer;I[Landroid/graphics/fonts/FontVariationAxis;II)Z (light greylist, reflection) 2025-06-05 19:19:53.298 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/graphics/FontFamily;->freeze()Z (light greylist, reflection) 2025-06-05 19:19:53.298 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/graphics/FontFamily;->abortCreation()V (light greylist, reflection) 2025-06-05 19:19:53.299 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/graphics/Typeface;->createFromFamiliesWithDefault([Landroid/graphics/FontFamily;Ljava/lang/String;II)Landroid/graphics/Typeface; (light greylist, reflection) 2025-06-05 19:19:53.400 2778-2778 OpenGLRenderer com.example.diaryapp D Skia GL Pipeline 2025-06-05 19:19:53.417 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden field Landroid/view/WindowInsets;->CONSUMED:Landroid/view/WindowInsets; (light greylist, reflection) 2025-06-05 19:19:53.417 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/view/View;->getViewRootImpl()Landroid/view/ViewRootImpl; (light greylist, reflection) 2025-06-05 19:19:53.417 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden field Landroid/view/View$AttachInfo;->mVisibleInsets:Landroid/graphics/Rect; (light greylist, reflection) 2025-06-05 19:19:53.417 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden field Landroid/view/ViewRootImpl;->mAttachInfo:Landroid/view/View$AttachInfo; (light greylist, reflection) 2025-06-05 19:19:53.429 2778-2820 <no-tag> com.example.diaryapp D HostConnection::get() New Host Connection established 0x7f2e2dac31c0, tid 2820 2025-06-05 19:19:53.429 2778-2820 <no-tag> com.example.diaryapp W Process pipe failed 2025-06-05 19:19:53.431 2778-2820 ConfigStore com.example.diaryapp I android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 2025-06-05 19:19:53.431 2778-2820 ConfigStore com.example.diaryapp I android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0 2025-06-05 19:19:53.431 2778-2820 OpenGLRenderer com.example.diaryapp I Initialized EGL, version 1.4 2025-06-05 19:19:53.431 2778-2820 OpenGLRenderer com.example.diaryapp D Swap behavior 1 2025-06-05 19:19:53.432 2778-2820 EGL_adreno com.example.diaryapp E CreateContext rcMajorVersion:3, minorVersion:2 2025-06-05 19:19:53.440 2778-2820 EGL_adreno com.example.diaryapp D eglCreateContext: 0x7f2e2da45b20: maj 3 min 2 rcv 3 2025-06-05 19:19:53.440 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:19:53.440 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:19:53.472 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:19:53.472 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:19:53.473 2778-2820 vndksupport com.example.diaryapp D Loading /vendor/lib64/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace. 2025-06-05 19:19:53.473 2778-2820 vndksupport com.example.diaryapp D Loading /vendor/lib64/hw/gralloc.gmin.so from current namespace instead of sphal namespace. 2025-06-05 19:19:53.476 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:19:53.476 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2db09100, error=EGL_BAD_MATCH 2025-06-05 19:19:53.902 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (light greylist, reflection) 2025-06-05 19:19:53.902 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (light greylist, reflection) 2025-06-05 19:19:53.902 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden method Landroid/os/Trace;->traceCounter(JLjava/lang/String;I)V (light greylist, reflection) 2025-06-05 19:19:58.602 2778-2845 ProfileInstaller com.example.diaryapp D Installing profile for com.example.diaryapp 2025-06-05 19:22:51.307 2778-2778 Choreographer com.example.diaryapp I Skipped 32 frames! The application may be doing too much work on its main thread. 2025-06-05 19:22:51.377 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:22:51.377 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:22:51.401 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:22:51.401 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2a73b480, error=EGL_BAD_MATCH 2025-06-05 19:22:52.875 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:22:52.875 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:22:52.879 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@b70dda7 2025-06-05 19:22:52.882 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:22:52.882 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2db09880, error=EGL_BAD_MATCH 2025-06-05 19:22:53.180 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:22:53.180 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:22:53.197 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:22:53.197 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2a73b480, error=EGL_BAD_MATCH 2025-06-05 19:22:53.203 2778-2778 Glide com.example.diaryapp W Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored 2025-06-05 19:22:59.515 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@dee6c34 2025-06-05 19:22:59.547 2778-2783 xample.diaryap com.example.diaryapp I Compiler allocated 4MB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int) 2025-06-05 19:22:59.572 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:22:59.572 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:22:59.586 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:22:59.586 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2db09b80, error=EGL_BAD_MATCH 2025-06-05 19:23:07.999 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:23:07.999 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:23:08.013 2778-2778 xample.diaryap com.example.diaryapp W Accessing hidden field Landroid/view/View;->mAccessibilityDelegate:Landroid/view/View$AccessibilityDelegate; (light greylist, reflection) 2025-06-05 19:23:08.015 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:23:08.015 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2a73b280, error=EGL_BAD_MATCH 2025-06-05 19:23:10.088 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@a431ad9 2025-06-05 19:23:10.141 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:23:10.141 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:23:10.160 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:23:10.160 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2da27800, error=EGL_BAD_MATCH 2025-06-05 19:23:18.089 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:23:18.089 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:23:18.109 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:23:18.109 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2a736700, error=EGL_BAD_MATCH 2025-06-05 19:23:20.289 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@6e93288 2025-06-05 19:23:20.343 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:23:20.343 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:23:20.364 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:23:20.364 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e1d387d00, error=EGL_BAD_MATCH 2025-06-05 19:23:22.178 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:23:22.178 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:23:22.188 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:23:22.188 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e1d5bf900, error=EGL_BAD_MATCH 2025-06-05 19:23:26.082 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:23:26.082 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:23:26.102 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:23:26.102 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e1d5bf900, error=EGL_BAD_MATCH 2025-06-05 19:27:41.046 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@4c87c69 2025-06-05 19:27:41.111 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:27:41.111 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:27:41.124 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:27:41.124 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e1d4afd00, error=EGL_BAD_MATCH 2025-06-05 19:27:42.651 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:27:42.651 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:27:42.667 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:27:42.667 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e1d4af080, error=EGL_BAD_MATCH 2025-06-05 19:27:42.732 2778-2789 System com.example.diaryapp W A resource failed to call close. 2025-06-05 19:27:42.732 2778-2789 chatty com.example.diaryapp I uid=10062(com.example.diaryapp) FinalizerDaemon identical 1 line 2025-06-05 19:27:42.734 2778-2789 System com.example.diaryapp W A resource failed to call close. 2025-06-05 19:27:44.377 2778-2820 OpenGLRenderer com.example.diaryapp D endAllActiveAnimators on 0x7f2e1623df00 (RippleDrawable) with handle 0x7f2e2dab3800 2025-06-05 19:27:44.393 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:27:44.393 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:27:44.416 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:27:44.416 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e16286180, error=EGL_BAD_MATCH 2025-06-05 19:27:48.098 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@845b71b 2025-06-05 19:27:48.195 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:27:48.195 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:27:48.203 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:27:48.203 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2a73b500, error=EGL_BAD_MATCH 2025-06-05 19:27:49.264 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@a6acb9a 2025-06-05 19:27:49.389 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:27:49.389 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:27:49.397 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:27:49.397 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e16286e00, error=EGL_BAD_MATCH 2025-06-05 19:28:07.132 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@e46c675 2025-06-05 19:28:07.237 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:28:07.237 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:28:07.262 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:28:07.262 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e16286e00, error=EGL_BAD_MATCH 2025-06-05 19:28:08.766 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:28:08.766 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:28:08.772 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@8487834 2025-06-05 19:28:08.777 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:28:08.777 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e162dca00, error=EGL_BAD_MATCH 2025-06-05 19:28:08.811 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:28:08.811 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:28:08.829 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:28:08.829 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2db8d000, error=EGL_BAD_MATCH 2025-06-05 19:28:11.031 2778-2778 ActivityThread com.example.diaryapp W handleWindowVisibility: no activity for token android.os.BinderProxy@4a13060 2025-06-05 19:28:11.094 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:28:11.094 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:28:11.115 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:28:11.115 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e16430500, error=EGL_BAD_MATCH 2025-06-05 19:28:12.651 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:28:12.651 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:28:12.671 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:28:12.671 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e162dc500, error=EGL_BAD_MATCH 2025-06-05 19:28:14.160 2778-2820 OpenGLRenderer com.example.diaryapp D endAllActiveAnimators on 0x7f2e165b7b00 (RippleDrawable) with handle 0x7f2e2db3c200 2025-06-05 19:28:14.178 2778-2820 EGL_adreno com.example.diaryapp E [getAttribValue] Bad attribute idx 2025-06-05 19:28:14.178 2778-2820 EGL_adreno com.example.diaryapp D eglGetConfigAttrib: bad attrib 0x3339 2025-06-05 19:28:14.197 2778-2820 EGL_adreno com.example.diaryapp E tid 2820: eglSurfaceAttrib(1615): error 0x3009 (EGL_BAD_MATCH) 2025-06-05 19:28:14.197 2778-2820 OpenGLRenderer com.example.diaryapp W Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f2e2db8d180, error=EGL_BAD_MATCH
最新发布
06-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值