Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mavenCentral dependency for gson #1116

Merged
merged 3 commits into from Mar 31, 2017

Conversation

liaxim
Copy link
Contributor

@liaxim liaxim commented Mar 30, 2017

  • update the gradle plugin version for the extension libraries

Fixes: gearvrf/GearVRf-Demos#431
Depends on: gearvrf/GearVRf-Demos#432

Will require documentation update to mention the new mavenCentral dependency
Will require a snapshot update for the maven repo

GearVRf-DCO-1.0-Signed-off-by: Mihail Marinov m.marinov@samsung.com

+ update the gradle plugin version for the extension libraries
@liaxim
Copy link
Contributor Author

liaxim commented Mar 30, 2017

@rahul27 Please help me verify this doesn't break something. Thanks.

@liaxim
Copy link
Contributor Author

liaxim commented Mar 30, 2017

Might be useful to include this in the 3.2 release.

+ NPE fix (unrelated) observer when exiting gvr-javascript
@liaxim
Copy link
Contributor Author

liaxim commented Mar 30, 2017

The NPE observed when exiting gvr-javascript:

03-30 11:45:26.614 14111 14111 E AndroidRuntime: FATAL EXCEPTION: main
03-30 11:45:26.614 14111 14111 E AndroidRuntime: Process: org.gearvrf.sample.gvrjavascript, PID: 14111
03-30 11:45:26.614 14111 14111 E AndroidRuntime: java.lang.RuntimeException: Unable to destroy activity {org.gearvrf.sample.gvrjavascript/org.gearvrf.sample.gvrjavascript.GearVRJavascriptActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void javax.script.Bindings.clear()' on a null object reference
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5143)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5166)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.app.ActivityThread.access$1700(ActivityThread.java:226)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1902)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:158)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7522)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void javax.script.Bindings.clear()' on a null object reference
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at org.gearvrf.script.GVRScriptManager$3.run(GVRScriptManager.java:143)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at org.gearvrf.script.GVRScriptManager.destroy(GVRScriptManager.java:391)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at org.gearvrf.GVRViewManager.onDestroy(GVRViewManager.java:74)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at org.gearvrf.DaydreamViewManager.onDestroy(DaydreamViewManager.java:94)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at org.gearvrf.GVRActivity.onDestroy(GVRActivity.java:210)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.app.Activity.performDestroy(Activity.java:7102)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1170)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5121)
03-30 11:45:26.614 14111 14111 E AndroidRuntime: 	... 9 more

The fix is included in this pull request.

@rahul27
Copy link
Contributor

rahul27 commented Mar 30, 2017

Sure. Will test this today.

@liaxim
Copy link
Contributor Author

liaxim commented Mar 30, 2017

With this change in I modified the dependencies for gvr-simplesample to include:

compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'

and the build produced successfully an apk that ran fine.

@rahul27
Copy link
Contributor

rahul27 commented Mar 30, 2017

GVRf/tools/gvr-scene-editor needs the gson dependency. It depends on the SceneSerializer.

@rahul27
Copy link
Contributor

rahul27 commented Mar 30, 2017

Looks good. I've tested using the retrofit gson library and it compiles and runs fine. Verified that the gvr-javascript and scene editor also work fine with this change.

@liaxim
Copy link
Contributor Author

liaxim commented Mar 31, 2017

Will merge today after lunch.

@liaxim liaxim merged commit 56f26ac into Samsung:master Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants