在发布类型中构建android应用程序(cordova应用程序)时出错

时间:2018-07-20 05:26:35

标签: android cordova proguard android-proguard

我将android版本从6.3.0升级到7.1.1,并试图在发布模式下构建应用程序。

我添加的ProGuard规则是:-

-dontwarn org.apache.commons.**
-dontwarn org.apache.http.**;

-keepattributes Signature
-keepattributes Annotation
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
-dontwarn okio.**

-dontwarn org.codehaus.**
-dontwarn org.codehaus.mojo.**
-dontwarn retrofit2.Platform$Java8

我遇到以下错误:-

Warning: a2: can't find superclass or interface com.google.android.gcm.GCMBaseIntentService
Warning: a4: can't find superclass or interface com.google.android.gcm.GCMBroadcastReceiver
Warning: library class android.net.http.AndroidHttpClient extends or implements program class org.apache.http.client.HttpClient
Warning: a2: can't find referenced class com.google.android.gcm.GCMBaseIntentService
Warning: a2: can't find referenced class com.google.android.gcm.GCMBaseIntentService
Warning: a2: can't find referenced method 'void sendBroadcast(android.content.Intent)' in program class a2
Warning: a2: can't find referenced method 'android.content.SharedPreferences getSharedPreferences(java.lang.String,int)' in program class a2
Warning: a2: can't find referenced class com.google.android.gcm.GCMRegistrar
Warning: a2: can't find referenced class com.google.android.gcm.GCMRegistrar
Warning: a2: can't find referenced class com.google.android.gcm.GCMBaseIntentService
Warning: a4: can't find referenced class com.google.android.gcm.GCMBroadcastReceiver
Warning: a4: can't find referenced class com.google.android.gcm.GCMBroadcastReceiver

0 个答案:

没有答案