openwebrtc-examples icon indicating copy to clipboard operation
openwebrtc-examples copied to clipboard

NoClassDefFoundError com.ericsson.research.owr.OwrBridge

Open rubenhorn opened this issue 9 years ago • 7 comments

I am trying to develop a Google Glass App using Open WebRTC. I have imported openwebrtc.jar and openwebrtc_bridge.jar into my project:

project

Why do I get this error:

E/AndroidRuntime(7826): FATAL EXCEPTION: main
E/AndroidRuntime(7826): Process: *my package name*, PID: 7826
E/AndroidRuntime(7826): java.lang.NoClassDefFoundError: com.ericsson.research.owr.OwrBridge
E/AndroidRuntime(7826):     at *my package name*.CallActivity.onCreate(CallActivity.java:26)
E/AndroidRuntime(7826):     at android.app.Activity.performCreate(Activity.java:5235)
E/AndroidRuntime(7826):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1089)
E/AndroidRuntime(7826):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2188)
E/AndroidRuntime(7826):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2273)
E/AndroidRuntime(7826):     at android.app.ActivityThread.access$800(ActivityThread.java:138)
E/AndroidRuntime(7826):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1236)
E/AndroidRuntime(7826):     at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(7826):     at android.os.Looper.loop(Looper.java:149)
E/AndroidRuntime(7826):     at android.app.ActivityThread.main(ActivityThread.java:5045)
E/AndroidRuntime(7826):     at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(7826):     at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(7826):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime(7826):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
E/AndroidRuntime(7826):     at dalvik.system.NativeStart.main(Native Method)
11-10 14:02:04.433: I/Process(7826): Sending signal. PID: 7826 SIG: 9

Do I have to add more than just the two .jar-files?

rubenhorn avatar Nov 10 '15 13:11 rubenhorn

It seems that @nbermudezs has got OpenWebRTC to run on Glass, albeit slowly: https://github.com/EricssonResearch/openwebrtc/issues/499

Maybe he has some pointers.

stefanalund avatar Nov 10 '15 18:11 stefanalund

@bakedCouchPotato what is the purpose of openwebrtc-bridge.jar? I didn't have to include it for the app to work. I only included openwebrtc.jar

nbermudezs avatar Nov 12 '15 18:11 nbermudezs

openwebrtc-bridge.jar is used if you want to add WebRTC support to an Android WebView. When creating an app for Google Glass I suggest sticking with the native (Java) approach.

Rugvip avatar Nov 12 '15 19:11 Rugvip

Unfortunately I need to use WebRTC. I am porting a web app to glass and I used the WebRTC support of API level 21+ for smartphones.

I also tried removing the libraries from the Java Build Path and adding them to the /libs folder. This is the error that I get in the console when I try to compile:

The library 'openwebrtc_bridge.jar' contains native libraries that will not run on the device.
Additionally some of those libraries will interfer with the installation of the application because of their location in lib/
lib/ is reserved for NDK libraries.
The following libraries were found:
lib/armeabi-v7a/libopenwebrtc_bridge_jni.so

rubenhorn avatar Nov 13 '15 08:11 rubenhorn

You can still use WebRTC, just not in WebViews. If you have a web application you most likely need to rewrite the interface for it anyway, since websites are pretty ugly to use on Glass.

Uninstalling and reinstalling the app might solve that last issue, seems like there's an old .so lib left.

Rugvip avatar Nov 13 '15 09:11 Rugvip

I completely removed the app and reinstalled it, but I still get this error.

rubenhorn avatar Nov 13 '15 10:11 rubenhorn

OK, so how do I create native apps for with OWR? For the desktop app I use http://simplewebrtc.com/ Is OWR compatiple to this?

rubenhorn avatar Nov 23 '15 08:11 rubenhorn