minifyEnabled to true) when building your application, some code that is not called at the Java layer will be removed. However, such code may be called at the native layer, causing a no xxx method error.keep rules to prevent the code from being removed:-keep class com.tencent.xmagic.** { *;}-keep class org.light.** { *;}-keep class org.libpag.** { *;}-keep class org.extra.** { *;}-keep class com.gyailib.**{ *;}-keep class com.tencent.cloud.iai.lib.** { *;}-keep class com.tencent.beacon.** { *;}-keep class com.tencent.qimei.** { *;}-keep class androidx.exifinterface.** { *;}
build.gradle file of the host project:Android{configurations {all*.exclude group: 'com.google.code.gson'}}
Android targetSdkVersion is 31 or larger?Android targetSdkVersion is 31 or larger, you need to open the AndroidManifest.xml file in app and add the following tag to application:<uses-native-libraryandroid:name="libOpenCL.so"android:required="true" />//`true` indicates that the library is a must for the application to run. The application cannot be installed on a system without the library.//`false` indicates that the application can use the library if it is available, but can also run without it. It can be installed on a system without the library. If you set the parameter to `false`, you need to deal with the issues that may arise due to the absence of the library.//Android website introduction: %!s(<nil>)
/*** This method is used to rotate and mirror the RGBA texture. The process is to first rotate the texture Proceed in a clockwise direction. by 'rotation' degrees (which can take values of 0, 90, 180, 270), and then perform a horizontal flip (flipHorizontal) and a vertical flip (flipVertical)* Use case: Some streaming SDKs return horizontal textures or the characters in the image are facing the wrong direction, while the SDK requires that the characters in the texture are facing forward. Therefore, this method can be used to convert the texture.** @param srcID: The RGBA texture.* @param width: The width of the texture.* @param height: The height of the texture.* @param rotation: The angle of rotation.* @Returns: The rotated texture. Note: If rotated 90 or 270 degrees, the width needs to be swapped.*/public int convert(int srcID, int width, int height, @RotationDegreesValue int rotation, boolean flipVertical, boolean flipHorizontal)
/*** This method is used to convert an OES texture to an RGBA texture** @param srcID: The OES texture.* @param width: The width of the texture.* @param height: The height of the texture.* @Returns: The ID of the RGBA texture.*/public int oes2Rgba(int srcID, int width, int height)
implementation ('com.tencent.mediacloud:TencentEffect_S1-04:version'){ exclude group: "com.tencent.tav", module: "libpag"}
implementation 'com.tencent.tav:libpag:4.3.33-noffavc'
.aar.
Feedback