其他分享
首页 > 其他分享> > android-使用Vuforia配置Proguard时出错

android-使用Vuforia配置Proguard时出错

作者:互联网

我正在尝试将Vuforia设置为proguard设置,并显示错误日志:

Warning:com.qualcomm.ar.pl.ODGR7Controller: can’t find referenced
class com.osterhoutgroup.api.ext.ExtendDisplay

Warning:com.qualcomm.ar.pl.ODGX6Controller: can’t find referenced
class com.ti.s3d.S3DView$Layout

Warning:com.qualcomm.ar.pl.ODGX6Controller: can’t find referenced
class com.ti.s3d.S3DView$RenderMode

Warning:com.qualcomm.ar.pl.ODGX6Controller: can’t find referenced
class com.ti.s3d.S3DView

Warning:com.qualcomm.ar.pl.ODGX6Controller: can’t find referenced
class com.ti.s3d.S3DView$Layout

Warning:com.qualcomm.ar.pl.ODGX6Controller: can’t find referenced
class com.ti.s3d.S3DView$RenderMode

Warning:com.qualcomm.ar.pl.ODGX6Controller: can’t find referenced
class com.ti.s3d.S3DView$Layout

Warning:com.qualcomm.ar.pl.ODGX6Controller: can’t find referenced
class com.ti.s3d.S3DView$RenderMode

Warning:com.qualcomm.ar.pl.ODGX6Controller: can’t find referenced
class com.ti.s3d.S3DView

Warning:there were 11 unresolved references to classes or interfaces.

Warning:Exception while processing task java.io.IOException: Please
correct the above warnings first.

Error:Execution failed for task
‘:app:transformClassesAndResourcesWithProguardForDebug’.

java.io.IOException: Please correct the above warnings first.

我的保镖:

#tests

#-keep class com.qualcomm.** { *; }

-keep class com.vuforia.** { *; }

#-keep class com.qualcomm.ar.pl.** { *; }

-keep class com.vuforia.ar.pl.** { *; }

#-dontwarn class com.qualcomm.ar.pl.** { *; }

#-dontwarn class com.vuforia.ar.pl.**

解决方法:

我正在使用以下

-keep class com.vuforia.** { *; }
-keep interface com.vuforia.** { *; }

-keep class com.osterhoutgroup.** { *; }
-keep class com.ti.s3d.** { *; }

-dontwarn com.vuforia.ar.**

标签:vuforia,android-proguard,android
来源: https://codeday.me/bug/20191026/1939053.html