I want add a prebuilt jar dependency to frameworks, my Android.mk like this 
:

LOCAL_PATH := $(my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := pjjartof
LOCAL_SRC_FILES := gvr.jar
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := .jar
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)
include $(BUILD_PREBUILT)


i can built it and the result is succeed :

target Prebuilt: pjjartof 
(out/target/common/obj/JAVA_LIBRARIES/pjjartof_intermediates/classes.jar)
target Prebuilt: pjjartof 
(out/target/common/obj/JAVA_LIBRARIES/pjjartof_intermediates/javalib.jar)
target Prebuilt: pjjartof 
(out/target/product/rk3288/obj/JAVA_LIBRARIES/pjjartof_intermediates/pjjartof.jar)
Install: out/target/product/rk3288/system/framework/pjjartof.jar

and then , i add pjjartof to *framework/base/Android.mk*
and* framework/base/services/core/Android.mk*

but when i use the class in jar through a so file , it will be  appear some 
error :

I/art     (  469): Rejecting re-init on previously-failed class 
java.lang.Class<com.google.common.logging.nano.Vr$VREvent$SdkConfigurationParams>

I/art     (  469): Rejecting re-init on previously-failed class 
java.lang.Class<com.google.common.logging.nano.Vr$VREvent$SdkConfigurationParams>

I/art     (  469): Rejecting re-init on previously-failed class 
java.lang.Class<com.google.common.logging.nano.Vr$VREvent$SdkConfigurationParams>

W/System.err(  469):* java.lang.NoClassDefFoundError*: 
com.google.common.logging.nano.Vr$VREvent$SdkConfigurationParams

W/System.err(  469): at 
com.google.vr.ndk.base.SdkConfigurationReader.<clinit>(SourceFile:37)

W/System.err(  469): at 
com.google.vr.cardboard.VrParamsProviderJni.readSdkConfigurationParams(SourceFile:82)

W/System.err(  469): at 
com.android.server.pjgyro.Pjni.nativeCreateGvrCtx(Native Method)//*my 
service in framework*

W/System.err(  469): at 
com.android.server.pjgyro.PJGyroManagerService.getAppContextAndAntvrsdk(PJGyroManagerService.java:94)

W/System.err(  469): at 
com.android.server.pjgyro.PJGyroManagerService.isCreateContext(PJGyroManagerService.java:79)

W/System.err(  469): at 
com.android.server.pjgyro.PJGyroManagerService.getGyro(PJGyroManagerService.java:127)

W/System.err(  469): at 
android.os.IPJGyroManager$Stub.onTransact(IPJGyroManager.java:48)

W/System.err(  469): at android.os.Binder.execTransact(Binder.java:446)


pls tell me This approach is correct enough, and my jni method use jar 
class to init something , 

and is there any other way to implement a dynamic link library that 
references a static jar library.




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

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to