Errror when generating apk, with library volley

1

Hello, I am developing an application in android studio, when I want to generate it with signed apk, it gives me this error, I already have my key generated . I thank you for your help in advance.

  

Information: Gradle tasks [: app: assembleEsRelease]       Warning: com.android.volley.error.VolleyErrorHelper $ 1: can not find superclass or interface com.google.gson.reflect.TypeToken       Warning: com.android.volley.AsyncRequestLoader: can not find referenced class com.google.gson.Gson       Warning: com.android.volley.error.VolleyErrorHelper: can not find referenced class com.google.gson.Gson       Warning: com.android.volley.error.VolleyErrorHelper: can not find referenced method 'java.lang.reflect.Type getType ()' in program class com.android.volley.error.VolleyErrorHelper $ 1       Warning: com.android.volley.error.VolleyErrorHelper: can not find referenced class com.google.gson.Gson       Warning: com.android.volley.error.VolleyErrorHelper $ 1: can not find referenced class com.google.gson.reflect.TypeToken       Warning: com.android.volley.request.GsonRequest: can not find referenced class com.google.gson.Gson       Warning: com.android.volley.request.GsonRequest: can not find referenced class com.google.gson.JsonSyntaxException       Warning: com.android.volley.request.GsonRequest: can not find referenced class com.google.gson.Gson       Warning: com.android.volley.request.GsonRequest: can not find referenced class com.google.gson.JsonSyntaxException       Warning: there were 17 unresolved references to classes or interfaces.       Warning: there were 1 unresolved references to program class members.       Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.       Error: Execution failed for task ': app: transformClassesAndResourcesWithProguardForEsRelease'. > Job failed, see logs for details       Information: BUILD FAILED in 47s       Information: 1 error       Information: 13 warnings

Here my gradle

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'dev.dworks.libs:volleyplus:+'
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:support-vector-drawable:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    
asked by HENRRY ARIEL HERRERA ARAUZ 14.02.2018 в 18:50
source

1 answer

2

It's actually a warning ( warning )

  

Warning: com.android.volley.error.VolleyErrorHelper $ 1: can not find   superclass or interface com.google.gson.reflect.TypeToken   Warning: com.android.volley.AsyncRequestLoader: can not find referenced   class com.google.gson.Gson Warning: Exception while processing task   java.io.IOException: Please correct the above warnings first.   Error: Execution failed for task   ': app: transformClassesAndResourcesWithProguardForEsRelease'. > Job   failed, see logs for details

I think it's a Volley problem with the support library, within your proguard-rule.pro that is in the root add so it does not show the warning and you can generate your application:

-dontwarn com.google.gson.**
    
answered by 14.02.2018 в 20:42