如何解决Proguard 的 Admob Nativetemplates 错误
我正要发布我的应用程序。我的应用程序使用以下包:
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.firebase:firebase-auth:20.0.3'
implementation 'com.google.firebase:firebase-firestore:22.1.1'
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.google.firebase:firebase-storage:19.2.1'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'com.android.support:recyclerview-v7:30.0.0'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
implementation 'com.google.android.gms:play-services-ads:19.8.0'
implementation 'com.google.firebase:firebase-crashlytics:17.4.0'
implementation 'com.google.firebase:firebase-perf:19.1.1'
implementation project(':nativetemplates')
implementation 'com.google.firebase:firebase-core:18.0.2'
我打开了 Proguard
,但一直收到连接到 nativetemplates
的错误:
FAILURE: Build Failed with an exception.
* What went wrong:
Execution Failed for task ':nativetemplates:lint'.
> Lint found errors in the project; aborting build.
Fix the issues identified by lint,or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
Errors found:
Path\nativetemplates\src\main\res\values\attrs.xml:4: Error: Resource named 'TemplateView' does not start with the project's resource prefix 'gnt_'; rename to 'GntTemplateView' ? [ResourceName]
<declare-styleable name="TemplateView">
~~~~~~~~~~~~~~~~~~~
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
我的 proguard.txt
看起来像这样:
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep class * extends com.bumptech.glide.module.GlideModule
-keep class * extends com.bumptech.glide.module.AppGlideModule {
<init>(...);
}
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
-keep public class com.google.firebase.analytics.FirebaseAnalytics {
public *;
}
-keep public class com.google.android.gms.measurement.AppMeasurement {
public *;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。