Using framework classes inside libcore (build errors)

瀏覽次數:567 次
跳到第一則未讀訊息

Codebold

未讀,
2011年9月26日 下午5:21:212011/9/26
收件者: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

未讀,
2011年9月26日 下午6:17:412011/9/26
收件者: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

未讀,
2011年9月27日 凌晨1:55:012011/9/27
收件者: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

未讀,
2011年9月27日 中午12:48:342011/9/27
收件者: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

未讀,
2016年11月7日 上午10:33:342016/11/7
收件者: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.
回覆所有人
回覆作者
轉寄
0 則新訊息