Using framework classes inside libcore (build errors)

567 views
Skip to first unread message

Codebold

unread,
Sep 26, 2011, 5:21:21 PM9/26/11
to Android Building
I try to use some libraries located in the framework (frameworks/base/
core/java/android/ ...) inside a libcore class (dalvik/libcore/luni/
src/main/ ...).

But i get an error (Cannot find symbol ... , Package ... does not
exist) during the build process. Is it possible to include the
specific files in the Android.mk located under 'dalvik/libcore/'? I
tried something like:

LOCAL_SRC_FILES := $(call all-core-java-files,main)
LOCAL_SRC_FILES += \
pathToFile1 \
pathToFile2

But then i had to resolve dependencies over the whole framework. Could
LOCAL_JAVA_RESOURCE_DIRS or LOCAL_STATIC_LIBRARIES do the trick? And
if so, how should i use these directives?

Thanks for any advices or related informations!

Ying Wang

unread,
Sep 26, 2011, 6:17:41 PM9/26/11
to android-...@googlegroups.com
It seems a bit wired to me.
If you really want to do that, you can split out the code you need from framework.jar and merge it to core.jar.
But I am not sure if the dependency graph is simple enough to eliminate the circular.


--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

Johannes Köstler

unread,
Sep 27, 2011, 1:55:01 AM9/27/11
to android-...@googlegroups.com
Thanks for your fast reply!
Okay, this means that the framework.jar is not reachable from the core.jar, but vice versa, because framework.jar uses core.jar right?
Then sorry for the dumb question, until now i did not think of them as different jar libraries... But this clearly makes sense! So i have to rethink my package structure and find another way to pass the data needed between these libraries.

Sorry and thanks again!


2011/9/27 Ying Wang <wang...@android.com>

Ying Wang

unread,
Sep 27, 2011, 12:48:34 PM9/27/11
to android-...@googlegroups.com


2011/9/26 Johannes Köstler <code...@googlemail.com>

Thanks for your fast reply!
Okay, this means that the framework.jar is not reachable from the core.jar, but vice versa, because framework.jar uses core.jar right?
Right. 

Rohan Pansare

unread,
Nov 7, 2016, 10:33:34 AM11/7/16
to Android Building, code...@googlemail.com
Hi, I have the same problem and looking to include specific java files from frameworks/base into libcore.
How did you get through this problem?

Thanks,
Rohan.
Reply all
Reply to author
Forward
0 new messages