PropertyValuesHolder;在目标类上找不到类型float

时间:2015-10-15 01:15:02

标签: android android-animation proguard

我收到了Proguard设置的问题。我正在使用谷歌地图的标准动画制作动画车辆标记。在我的测试环境中,一切正常,但在生产环境中,动画不起作用。我在我的计划规则中遗漏了一些东西。我收到的错误是:

10-14 16:43:11.912 3730-3730/? W/PropertyValuesHolder: Method setAlpha() with type float not found on target class class com.google.android.gms.maps.model.e
10-14 16:43:11.912 3730-3730/? W/PropertyValuesHolder: Method setAlpha() with type float not found on target class class com.google.android.gms.maps.model.e
10-14 16:43:11.912 3730-3730/? W/PropertyValuesHolder: Method setAlpha() with type float not found on target class class com.google.android.gms.maps.model.e
10-14 16:43:11.932 273-273/? W/SurfaceFlinger: Fail to Open /sys/devices/platform/gpusysfs/fps

我尝试添加以下内容,但是他们没有帮助,但是,我确实相信我正在接受这个冲突的原因

#The class where I am animating my markers
-keep class com.example.VehicleMarker {
    void set*(***);
    *** get*();
}

#Keep due to ObjectAnimator using reflection to access get/sets
-keep class com.example.VehicleMarker { *; }

这是我的整个proguard规则文件

#PROGUARD DEFINITIONS
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose

-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

#Keep annotations and method signature
-keepattributes *Annotation*
-keepattributes Signature

#Keep classes that are referenced on the AndroidManifest
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class com.android.vending.licensing.ILicensingService

#Keep set and get values for VehicleMarker class
-keep class com.example.VehicleMarker {
    void set*(***);
    *** get*();
}

#Keep due to ObjectAnimator using reflection to access get/sets
-keep class com.example.VehicleMarker { *; }

#Maintain google libraries (won't be stripped)
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
    public static final *** NULL;
}

#Maintain gms annotations
-dontwarn com.google.android.gms.**
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
    @com.google.android.gms.common.annotation.KeepName *;
}

#Maintain twitter
-dontwarn twitter4j.**
-keep class twitter4j.conf.PropertyConfigurationFactory
-keep class twitter4j.** { *; }

#Maintain square okhttp
-dontwarn okio.**
-dontwarn com.squareup.okhttp.**
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }

#Maintain retrofit
-dontwarn rx.**
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
    @retrofit.http.* <methods>;
}

#Maintain flurry
-dontwarn com.flurry.**
-keep class com.flurry.** { *; }

#Maintain facebook
-keep class com.facebook.** { *; }

#To remove debug logs:
-assumenosideeffects class android.util.Log {
    public static *** d(...);
    public static *** v(...);
}

#Maintain java native methods 
-keepclasseswithmembernames class * {
    native <methods>;
}

#Maintain classes with member names
-keepclasseswithmembernames class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

#Maintain classes with member names
-keepclasseswithmembernames class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

#Maintain classes with enum
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

#Maintain parcelable objects
-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

#Maintain list resource bundles
-keep class * extends java.util.ListResourceBundle {
    protected Object[][] getContents();
}

#Keep the R
-keepclassmembers class **.R$* {
    public static <fields>;
}

#To repackage classes on a single package
-repackageclasses ''

#Print mapping
-printmapping mapping.txt

任何有关此的帮助将不胜感激。提前谢谢!

0 个答案:

没有答案