How to downgrade proguard in android gradle studio?

I am trying to create an android application using scala and android studio. Compilation failed in proguard with the exception:

Error:java.lang.ArrayIndexOutOfBoundsException: 4 at proguard.classfile.editor.InterfaceDeleter.visitSignatureAttribute(InterfaceDeleter.java:162) at proguard.classfile.attribute.SignatureAttribute.accept(SignatureAttribute.java:97) 

I found elsewhere ( http://sourceforge.net/p/proguard/bugs/549/ ) that this problem is caused by an error in scala, but it only occurs in proguard 5.1 and not in proguard 5.0.

Now my question is: how can I configure Android studio to use proguard 5.0?

+7
android scala intellij-idea android-gradle proguard
source share
1 answer

Found it!

The trick is to exclude proguard 5.1 in the build tovelvel file and add a dependency on 5.0 instead.

Here is my toplevel build file:

 // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { mavenCentral() } dependencies { classpath ('com.android.tools.build:gradle:1.0.0') { exclude module: 'proguard-gradle' } classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.3.1" classpath ('net.sf.proguard:proguard-gradle:5.0') { force = true } } } allprojects { repositories { jcenter() } } 
+6
source share

All Articles