2

Using socialauth-android, when I try to export my project I get these warnings:

    Warning: org.brickred.socialauth.util.SocialAuthUtil: can't find referenced class javax.servlet.http.HttpServletRequest
     Warning: there were 111 unresolved references to classes or interfaces.
              You may need to add missing library jars or update their versions.
              If your code works fine without the missing classes, you can suppress
              the warnings with '-dontwarn' options.
     Warning: there were 140 unresolved references to program class members.
              Your input classes appear to be inconsistent.
              You may need to recompile the code or update the library versions.
              Alternatively, you may have to specify the option 
              '-dontskipnonpubliclibraryclassmembers'.
     java.io.IOException: Please correct the above warnings first.
        at proguard.Initializer.execute(Initializer.java:330)
        at proguard.ProGuard.initialize(ProGuard.java:212)
        at proguard.ProGuard.execute(ProGuard.java:87)
        at proguard.ProGuard.main(ProGuard.java:484)

Could someone help?

stepic
  • 673
  • 9
  • 19

2 Answers2

6

Problem is gone using this proguard cfg:

-keep class org.brickred.** { *; } -dontwarn org.brickred.**
stepic
  • 673
  • 9
  • 19
0

Do you have the jars directly in your libs? Or are you getting them through maven? Which sdk version are you running?

If you add jars in at compile time, it might not get included in proguard processing. The jars has to be in place after pre-build target is ran.

Phuong Nguyen
  • 909
  • 7
  • 20
  • I put jars directly in libs. I'm using latest sdk v2.5 – stepic Jun 12 '13 at 04:46
  • I mean which android sdk are you building with, latest version is r22. There are some significant changes that took place in r16+. Is your project one single app? Or is structured as app -> library project -> external libs? – Phuong Nguyen Jun 12 '13 at 21:34
  • I'm building with latest Android SDK and I have as external libs social-auth and socialauth-android jars – stepic Jun 13 '13 at 05:33
  • If you are including the jar directly instead of though maven, make sure you have all the dependency libs. See http://grepcode.com/snapshot/repo1.maven.org/maven2/org.brickred/socialauth/4.0/ – Phuong Nguyen Jun 13 '13 at 06:08
  • I'm not familiar with Maven and tried to include other dependency libs. It resulted on other requested dependencies! The thing I don't understand is why in debug mode (launching with USB connected) it does work and exporting as APK without using Proguard works also without these dependencies! – stepic Jun 13 '13 at 12:33