Progaurd error while using jackson libraries in my app in AOSP.

1,115 views
Skip to first unread message

shridutt kothari

unread,
Apr 8, 2014, 7:00:32 AM4/8/14
to android-...@googlegroups.com
Hi all ,

Getting Progaurd error while using jackson libraries in my app in AOSP:

Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: there were 4 unresolved references to classes or interfaces.
         You may need to specify additional library jars (using '-libraryjars'),
         or perhaps the '-dontskipnonpubliclibraryclasses' option.
Error: Please correct the above warnings first.
make: *** [out/target/common/obj/APPS/ShriApp_intermediates/proguard.classes.jar] Error 1


I think progaurd is not able to find some references to internal classes in jackson lib.

Anyone knonw how to solve this??

Thanks,
Shridutt Kothari
Impetus Infotech India Ltd.

shridutt kothari

unread,
Apr 8, 2014, 8:11:24 AM4/8/14
to android-...@googlegroups.com
Found solution (found flag at http://stackoverflow.com/questions/11246842/using-proguard-with-android/11249755#11249755, and how to use the flag can be learned from default Launcher2 app):
Added following line in Android.mk:
 
LOCAL_PROGUARD_FLAG_FILES := proguard.flags 

created a file (proguard.flags) with following flag:

-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry

I hope it would also be helpful to others, facing same issue.

Thanks,
Shridutt Kothari,
Impetus Infotech India Ltd.

shridutt kothari

unread,
Jul 11, 2014, 6:27:18 AM7/11/14
to android-...@googlegroups.com
Android.mk's content is :


LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_PACKAGE_NAME := AppName
LOCAL_CERTIFICATE := platform

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := jackson-annotations-2.2.3 jackson-core-2.2.3 jackson-databind-2.2.3

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_PACKAGE)

include $(CLEAR_VARS)  

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := jackson-annotations-2.2.3:lib/jackson-annotations-2.2.3.jar jackson-core-2.2.3:lib/jackson-core-2.2.3.jar jackson-databind-2.2.3:lib/jackson-databind-2.2.3.jar

include $(BUILD_MULTI_PREBUILT)

Thanks,
Shridutt

shridutt kothari

unread,
Jul 11, 2014, 6:28:35 AM7/11/14
to android-...@googlegroups.com
proguard.flags file content is: 

-libraryjars lib/jackson-annotations-2.2.3.jar
-libraryjars lib/jackson-core-2.2.3.jar

-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry
Reply all
Reply to author
Forward
0 new messages