Search code examples
androidandroid-studiogradleproguardandroid-proguard

missing EOF at '-keepclass' proguard android


when I add one line in proguard file its showing error Error:com.android.build.gradle.shrinker.parser.ProguardParserException: ProGuard configuration parser error: /root/projectDirectory/myprojectname/app/proguard-rules.pro line 42:0 missing EOF at '-keepclass'.

If I remove this file it shows Error : Method code too large.

The project builds successful without proguard. Any suggestion ?? Thanks.


Solution

  • This is because you're using an invalid rule with something like:

    -keepclass com.example.activity {*;}
    

    it should be

    -keep class com.example.activity {*;}