Closed Matcha-xiaobin closed 1 year ago
Can you please write in English ....
I want to know how to write proguard-rules for this library
I'm sorry, I used Google Translate, I don't know if the translation result can be understood. I ran into the following problem: When I packaged the release package, I encountered ClassNotFoundException: Didn't find class "org.apache.commons.logging.impl.LogFactoryImpl" on the phone
version: 2.68.0-SNAPSHOT
Caused by:org.apache.commons.logging.LogConfigurationException:java.lang.NullPointerException:
Attempt to invoke virtual method'java.lang.Stringjava.lang.String.trim()'on a null object reference
(Caused byjava.lang.NullPointerException:Attempt to invoke virtual method'java.lang.Stringjava.lang.String.trim()'on a null object reference)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:40)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:3)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:1)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:1)
at com.gargoylesoftware.htmlunit.WebClient.
translation is ok - will have a look at this later
Sorry to bother you, I have found a solution to this problem.
No problem...
@Matcha-xiaobin is there anything i can improve in the documentation to help others wit the same problem?
No problem...
@Matcha-xiaobin is there anything i can improve in the documentation to help others wit the same problem?
Currently my workaround is:
Import dependency: "commons-logging:commons-logging:1.2" Although Gradle will prompt an error, but after packaging the release package, it will not appear that the LogFactory class cannot be found. Then write proguard-rules, adding the following sentences: -keep class org.apache. {*;} -keep class org.htmlunit.* {;} -keep class org.w3c. {*;} -keep class org.xml. {*;} -keep class com.gargoylesoftware.* {;} -keep class javax.xml. {*;} -keep class net.sourceforge.htmlunit.* {;} -keep class netscape.javascript.* {;}
After doing the above processing, the problem is solved. I hope it can help you, thank you!
ok, have at least added some info about the packages to the readme.
请问我该如何写混淆规则?