Closed fanatic75 closed 5 years ago
In which platform, which RN version and which react-native-smtp-mailer version? Can you also open android logcat and see the error there for more info?
my code was building fine into release mode until I added this module in my react native project. Now I get some warning from proguardrelease, so I added -ignorewarnings into my progurard rules file and it builds fine now. But it shows me error:smtp in the catch function whenever I send the mail.
Also in the manual installation for android, you have written to add changes to the file MainActivity.Java, shouldn't it be MainApplication.java? Because the things you're telling us to add are in MainApplication.java for eg : getPackages() is in MainApplication.java and I have added new RNSmtpMailerPackage() under asList
Okay so I fixed this issue by removing proguard from the application and then building it again. But I really want the proguard to keep my application size smaller and safer. I'll post my release log file. Can you please tell me how should I fix those warnings which I'm getting when proguard is enabled and minifyEnabled is true and shrinkResources is true too.
Unfortunately i have no experience with proguard flow...
Could you post the warnings that reference this library?
Also could you post the error through android logcat? (Not the catch on js side, but through the logcat on android studio)
So you don't enable Proguard for your android apps?
Happy news i found the solution here, add to your proguard file the following (and remove -ignorewarnings):
-dontshrink
-keep class javax.** {*;}
-keep class com.sun.** {*;}
-keep class myjava.** {*;}
-keep class org.apache.harmony.** {*;}
-dontwarn java.awt.**
-dontwarn java.beans.Beans
-dontwarn javax.security.**
-dontwarn javax.activation.**
It worked. Thanks mate! Also I didn't use -dontshrink either. Will put up a merge request by adding in the documentation.
It shows error : smtp in the catch function in release build. Works fine when I'm trying this on debug mode.