1

i'm using this SDK in my app: http://salesforce-marketingcloud.github.io/JB4A-SDK-Android/ (Version: 4.4.1)

After I included the SDK in my project I got alot of errors in the gradle console:

AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
AGPBI: {"kind":"error","text":"(com.exacttarget.etpushsdk.ETPushConfig$1) that doesn\u0027t come with an","sources":[{}]}
AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
AGPBI: {"kind":"error","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
AGPBI: {"kind":"error","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
AGPBI: {"kind":"error","text":"indicate that it is *not* an inner class.","sources":[{}]}
AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
AGPBI: {"kind":"error","text":"(com.exacttarget.etpushsdk.ad) that doesn\u0027t come with an","sources":[{}]}
AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
AGPBI: {"kind":"error","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
AGPBI: {"kind":"error","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
AGPBI: {"kind":"error","text":"indicate that it is *not* an inner class.","sources":[{}]}
[...] 384 errors in total

I think this is caused by ProGuard which is used to obfuscate the SDK. Could these errors be removed in an upcoming version?

Environment:

Gradle: 2.13

JVM: 1.8.0_74 (Oracle Corporation 25.74-b02)

OS: Mac OS X 10.11.5 x86_64

1 Answer 1

0

Most of these errors are caused by Proguard and calls to things like Thread thread = new Thread(); Those end up as anonymous inner-classes and generate those messages. Google Play Services is famous for those as well and Google recommends adding an "ignore" statement to your Proguard configuration file.

4
  • this didn't work for me, my proguard rules are: -keep class com.exacttarget.etpushsdk.** { ; } -keepattributes InnerClasses -dontwarn com.exacttarget.*
    – d.peters
    Commented Jul 1, 2016 at 15:51
  • I will open an item and put it into the product backlog for prioritization.
    – Bill Mote
    Commented Jul 1, 2016 at 16:01
  • @BillMote This is not a client-side Proguard issue - when we do a Non-Proguard build we see 288 errors from including salesforce SDK, if we include with transitive=true we see 416 errors. Like the OP we are building with JDK 1.8 There is definitely something wrong in the way the Salesforce SDK is being built. Commented Aug 24, 2016 at 21:26
  • I get the same error count (416) when building your LearningAppAndroid (Debug mode - no Proguard) with JDK 1.8 - so this should be very easy to reproduce. Commented Aug 24, 2016 at 21:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .