Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proguard configuration for Big query

I have implemented big query in my project using following gradle file

   compile ('com.google.apis:google-api-services-bigquery:v2-rev328-1.22.0'){
    exclude module: 'httpclient' //by artifact name
    exclude group: 'org.apache.httpcomponents' //by group
    exclude group: 'org.apache.httpcomponents', module: 'httpclient' //by both name and group
}

and in proguard file i added following

-dontwarn com.google.api.client.**

 -keepclassmembers class * {
 @com.google.api.client.util.Key <fields>;
 }

-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
 -dontwarn com.google.api.client.extensions.android.**
 -dontwarn com.google.api.client.googleapis.extensions.android.**

but i am getting following error.

                Exception   = [java.lang.IllegalArgumentException] (Value "i" is not a        reference value [proguard.evaluation.value.UnknownIntegerValue])
                Warning:Exception while processing task java.io.IOException: java.lang.IllegalArgumentException: Value "i" is not a reference value [proguard.evaluation.value.UnknownIntegerValue]
                :app:transformClassesAndResourcesWithProguardForRelease FAILED
                Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
                > java.io.IOException: java.lang.IllegalArgumentException: Value "i" is not a reference value [proguard.evaluation.value.UnknownIntegerValue]

I have gone through available solutions but none of them helped.

Any help will be much appreciated.Thanks in advance.

like image 464
Harry Sharma Avatar asked Feb 06 '23 17:02

Harry Sharma


1 Answers

Add the following code to the proguard config file (proguard-project.txt)

-optimizations !class/unboxing/enum

This is bug in Proguard as discussed here

like image 143
Pentium10 Avatar answered Feb 12 '23 03:02

Pentium10