David Dong

David Dong

Java/C/C#/Python

Java/C/C#/Python

POST

Some tips for android development errors

Today I met an error when I was trying to customize the android.widget.Button Class.😕
The error information is

"This custom view should extend android.support.v7.widget.AppCompatButton instead."

The temporary solution that I used is as below.

import android.annotation.SuppressLint;
@SuppressLint("AppCompatCustomView")

Besides, I had met

"I/hwservicemanager: getTransport: Cannot find entry" 

when running the application. That’s because the application used the HIDL interface which should register at the vintf/manifest.xml but hasn’t been done. This feature is introduced at Android O. Obviously, the solution is registering all of the HIDL interfaces that will be used at manifest.xml.

Another issue is

"avc: denied { read } for name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=27157 
scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:vendor_default_prop:s0 
tclass=file permissive=1"

which is related to selinux, the selinux policy is missing that cause the permission is rejected. Need to add the permission to selinux.


Android

You may also like

further reading