Skip to main content
2 de 4
se añadieron 22717 caracteres en el cuerpo

Crash al usar Proguard con JACK

Estoy probando Jack en android studio puedo generar el app-release.apk con este build.gradle sin problema, pero a la hora de ejecutarla crashea:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.2"
    defaultConfig {
        applicationId "com.my.personal.project"
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 1
        versionName "1.0.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    jackOptions {
        enabled true
    }
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
testCompile 'junit:junit:4.12'
}

Si desactivo minify no hay ningun fallo, pero el apk pasa a ocupar mas del doble de tamaño...

añado logcat:

E/AndroidRuntime: FATAL EXCEPTION: main
                                               Process: com.my.personal.project, PID: 19382
                                               java.lang.RuntimeException: Unable to start activity ComponentInfo{com.my.personal.project/com.my.personal.project.MainActivity}: android.view.InflateException: Binary XML file line #16: Binary XML file line #16: Error inflating class android.support.design.widget.NavigationView
                                                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
                                                   at android.app.ActivityThread.access$1100(ActivityThread.java:221)
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
                                                   at android.os.Handler.dispatchMessage(Handler.java:102)
                                                   at android.os.Looper.loop(Looper.java:158)
                                                   at android.app.ActivityThread.main(ActivityThread.java:7225)
                                                   at java.lang.reflect.Method.invoke(Native Method)
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
                                                Caused by: android.view.InflateException: Binary XML file line #16: Binary XML file line #16: Error inflating class android.support.design.widget.NavigationView
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
                                                   at android.support.v7.c.af.o(Unknown Source)
                                                   at android.support.v7.c.a.setContentView(Unknown Source)
                                                   at com.my.personal.project.MainActivity.onCreate(Unknown Source)
                                                   at android.app.Activity.performCreate(Activity.java:6876)
                                                   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
                                                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 
                                                   at android.app.ActivityThread.access$1100(ActivityThread.java:221) 
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 
                                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                   at android.os.Looper.loop(Looper.java:158) 
                                                   at android.app.ActivityThread.main(ActivityThread.java:7225) 
                                                   at java.lang.reflect.Method.invoke(Native Method) 
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                                                Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class android.support.design.widget.NavigationView
                                                   at android.view.LayoutInflater.createView(LayoutInflater.java:657)
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
                                                   at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)
                                                   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:527)
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:429) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:380) 
                                                   at android.support.v7.c.af.o(Unknown Source) 
                                                   at android.support.v7.c.a.setContentView(Unknown Source) 
                                                   at com.my.personal.project.MainActivity.onCreate(Unknown Source) 
                                                   at android.app.Activity.performCreate(Activity.java:6876) 
                                                   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) 
                                                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206) 
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 
                                                   at android.app.ActivityThread.access$1100(ActivityThread.java:221) 
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 
                                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                   at android.os.Looper.loop(Looper.java:158) 
                                                   at android.app.ActivityThread.main(ActivityThread.java:7225) 
                                                   at java.lang.reflect.Method.invoke(Native Method) 
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                                                Caused by: java.lang.reflect.InvocationTargetException
                                                   at java.lang.reflect.Constructor.newInstance(Native Method)
                                                   at android.view.LayoutInflater.createView(LayoutInflater.java:631)
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) 
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) 
                                                   at android.view.LayoutInflater.rInflate(LayoutInflater.java:847) 
                                                   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:527) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:429) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:380) 
                                                   at android.support.v7.c.af.o(Unknown Source) 
                                                   at android.support.v7.c.a.setContentView(Unknown Source) 
                                                   at com.my.personal.project.MainActivity.onCreate(Unknown Source) 
                                                   at android.app.Activity.performCreate(Activity.java:6876) 
                                                   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) 
                                                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206) 
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 
                                                   at android.app.ActivityThread.access$1100(ActivityThread.java:221) 
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 
                                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                   at android.os.Looper.loop(Looper.java:158) 
                                                   at android.app.ActivityThread.main(ActivityThread.java:7225) 
                                                   at java.lang.reflect.Method.invoke(Native Method) 
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                                                Caused by: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class android.support.design.internal.NavigationMenuView
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
                                                   at android.support.design.internal.c.b(Unknown Source)
                                                   at android.support.design.widget.NavigationView.<init>(Unknown Source)
                                                   at android.support.design.widget.NavigationView.<init>(Unknown Source)
                                                   at java.lang.reflect.Constructor.newInstance(Native Method) 
                                                   at android.view.LayoutInflater.createView(LayoutInflater.java:631) 
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) 
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) 
                                                   at android.view.LayoutInflater.rInflate(LayoutInflater.java:847) 
                                                   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:527) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:429) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:380) 
                                                   at android.support.v7.c.af.o(Unknown Source) 
                                                   at android.support.v7.c.a.setContentView(Unknown Source) 
                                                   at com.my.personal.project.MainActivity.onCreate(Unknown Source) 
                                                   at android.app.Activity.performCreate(Activity.java:6876) 
                                                   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) 
                                                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206) 
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 
                                                   at android.app.ActivityThread.access$1100(ActivityThread.java:221) 
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 
                                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                   at android.os.Looper.loop(Looper.java:158) 
                                                   at android.app.ActivityThread.main(ActivityThread.java:7225) 
                                                   at java.lang.reflect.Method.invoke(Native Method) 
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                                                Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.design.internal.NavigationMenuView
                                                   at android.view.LayoutInflater.createView(LayoutInflater.java:657)
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:429) 
                                                   at android.support.design.internal.c.b(Unknown Source) 
                                                   at android.support.design.widget.NavigationView.<init>(Unknown Source) 
                                                   at android.support.design.widget.NavigationView.<init>(Unknown Source) 
                                                   at java.lang.reflect.Constructor.newInstance(Native Method) 
                                                   at android.view.LayoutInflater.createView(LayoutInflater.java:631) 
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) 
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) 
                                                   at android.view.LayoutInflater.rInflate(LayoutInflater.java:847) 
                                                   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:527) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:429) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:380) 
                                                   at android.support.v7.c.af.o(Unknown Source) 
                                                   at android.support.v7.c.a.setContentView(Unknown Source) 
                                                   at com.my.personal.project.MainActivity.onCreate(Unknown Source) 
                                                   at android.app.Activity.performCreate(Activity.java:6876) 
                                                   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) 
                                                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206) 
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 
                                                   at android.app.ActivityThread.access$1100(ActivityThread.java:221) 
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 
                                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                   at android.os.Looper.loop(Looper.java:158) 
                                                   at android.app.ActivityThread.main(ActivityThread.java:7225) 
                                                   at java.lang.reflect.Method.invoke(Native Method) 
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                                                Caused by: java.lang.reflect.InvocationTargetException
                                                   at java.lang.reflect.Constructor.newInstance(Native Method)
                                                   at android.view.LayoutInflater.createView(LayoutInflater.java:631)
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) 
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:498) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:429) 
                                                   at android.support.design.internal.c.b(Unknown Source) 
                                                   at android.support.design.widget.NavigationView.<init>(Unknown Source) 
                                                   at android.support.design.widget.NavigationView.<init>(Unknown Source) 
                                                   at java.lang.reflect.Constructor.newInstance(Native Method) 
                                                   at android.view.LayoutInflater.createView(LayoutInflater.java:631) 
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) 
                                                   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) 
                                                   at android.view.LayoutInflater.rInflate(LayoutInflater.java:847) 
                                                   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:527) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:429) 
                                                   at android.view.LayoutInflater.inflate(LayoutInflater.java:380) 
                                                   at android.support.v7.c.af.o(Unknown Source) 
                                                   at android.support.v7.c.a.setContentView(Unknown Source) 
                                                   at com.my.personal.project.MainActivity.onCreate(Unknown Source) 
                                                   at android.app.Activity.performCreate(Activity.java:6876) 
                                                   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) 
                                                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206) 
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 
                                                   at android.app.ActivityThread.access$1100(ActivityThread.java:221) 
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 
                                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                   at android.os.Looper.loop(Looper.java:158) 
                                                   at android.app.ActivityThread.main(ActivityThread.java:7225) 
                                                   at java.lang.reflect.Method.invoke(Native Method) 
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                                                Caused by: java.lang.VerifyError: Rejecting class android.support.v7.widget.r because it failed compile-time verification (declaration of 'android.support.v7.widget.r' appears in /data/app/com.my.personal.project-2/base.apk)
                                                   at android.support.v7.widget.bw.<init>(Unknown Source)
                                                   at android.support.design.internal.NavigationMenuView.<init>(Unknown Source)
                                                at and