Error: Can't find common super class of

后端 未结 4 1494
清酒与你
清酒与你 2021-01-02 03:14

I am trying to process with Proguard a MS Windows desktop application (Java 6 SE using the SWT lib provided by Eclipse). And I get the following critical error:



        
4条回答
  •  孤独总比滥情好
    2021-01-02 03:50

    I had the same issue but did not try specifying the -dontskipnonpubliclibraryclasses or any other option to get fixed. My problem was occurring on java.lang.StringBuffer class, which was very weird. StringBuffer class was being used all over the project and the error did not occur anywhere else.

    To fix, all I did was to move the scope of StringBuffer.

    OLD Code - with error:

    function(){
       if(condition){
           StringBuffer buffer = new StringBuffer();
           //additional code
       }else if(condition){
           StringBuffer buffer = new StringBuffer();
           //additional code
       }
    }
    

    NEW Code - without problem.

    function(){
        StringBuffer buffer = new StringBuffer();
    
           if(condition){
    
               //additional code
           }else if(condition){
    
               //additional code
           }
        }
    

    I have a feeling this has to do something with ProGuard and how it parses the code.

提交回复
热议问题