Open notoken opened 9 years ago
Issue is with the OSNetworkSystem.cpp jni file. InetAddress class changed in Android 4. Use this patch and make a new build.
Index: jni/OSNetworkSystem.cpp
===================================================================
--- jni/OSNetworkSystem.cpp (revision 683)
+++ jni/OSNetworkSystem.cpp (working copy)
@@ -1181,9 +1181,14 @@
char useAdbNetworkingProperty[PROPERTY_VALUE_MAX];
char adbConnectedProperty[PROPERTY_VALUE_MAX];
+ char sdkVersionStr[PROPERTY_VALUE_MAX];
+ int sdkVersion = 0;
property_get("android.net.use-adb-networking", useAdbNetworkingProperty, "");
property_get("adb.connected", adbConnectedProperty, "");
+ property_get("ro.build.version.sdk", sdkVersionStr, "0");
+
+ sdkVersion = atoi(sdkVersionStr);
if (strlen((char *)useAdbNetworkingProperty) > 0
&& strlen((char *)adbConnectedProperty) > 0) {
@@ -1204,15 +1209,16 @@
gCachedFields.iaddr_class = (jclass) env->NewGlobalRef(iaddrclass);
- jmethodID iaddrclassinit = env->GetMethodID(iaddrclass, "<init>", "()V");
+ if (sdkVersion < 14) {
+ jmethodID iaddrclassinit = env->GetMethodID(iaddrclass, "<init>", "()V");
- if (iaddrclassinit == NULL) {
- jniThrowException(env, "java/lang/NoSuchMethodError", "InetAddress.<init>()");
- return;
+ if (iaddrclassinit == NULL) {
+ jniThrowException(env, "java/lang/NoSuchMethodError", "InetAddress.<init>()");
+ return;
+ }
+
+ gCachedFields.iaddr_class_init = iaddrclassinit;
}
-
- gCachedFields.iaddr_class_init = iaddrclassinit;
-
jmethodID iaddrgetbyaddress = env->GetStaticMethodID(iaddrclass,
"getByAddress", "([B)Ljava/net/InetAddress;");
Did somebody resolve this problem?
The patch supplied was not sufficient but I have now made a more comprehensive fix for it. Please try v1.12.11 or later
https://github.com/opentelecoms-org/codecs/commit/0987f2b5e13e71206360a04a385e113ceba113d5
Disabled minify and it's working fine now.
Hi All
I've been trying to run Lumicall on a Nexus 5 with Android 5.
Lumicall can register to the SIP server but can't make phone calls. The program crashes but stays active in the notification bar, it has to be killed by hand in order to stop it, one of the errors viewed using logcat is the following:
I/UserAgent(30478): Starting Async call setup phase I/UserAgent(30478): UA: begin ICE setup (outbound) W/linker (30478): libOSNetworkSystem.so has text relocations. This is wasting memory and prevents security hardening. Please fix. F/art (30478): art/runtime/thread.cc:1105] No pending exception expected: java.lang.NoSuchMethodError: no non-static method "Ljava/net/InetAddress;.()V"
F/art (30478): art/runtime/thread.cc:1105] at void
org.sipdroid.net.impl.OSNetworkSystem.oneTimeInitializationImpl(boolean)
(OSNetworkSystem.java:-2)
F/art (30478): art/runtime/thread.cc:1105] at void
org.sipdroid.net.impl.OSNetworkSystem.oneTimeInitialization(boolean)
(OSNetworkSystem.java:742)
F/art (30478): art/runtime/thread.cc:1105] at void
org.sipdroid.net.SipdroidSocket.() (SipdroidSocket.java:142)
F/art (30478): art/runtime/thread.cc:1105] at void
org.sipdroid.sipua.UserAgent.setupICE(org.zoolu.sip.address.NameAddress)
(UserAgent.java:480)
F/art (30478): art/runtime/thread.cc:1105] at boolean
org.sipdroid.sipua.UserAgent.callAsync(java.lang.String, boolean)
(UserAgent.java:663)
F/art (30478): art/runtime/thread.cc:1105] at java.lang.Object
org.sipdroid.sipua.UserAgent$1.doInBackground(java.lang.Object[])
(UserAgent.java:637)
F/art (30478): art/runtime/thread.cc:1105] at java.lang.Object
android.os.AsyncTask$2.call() (AsyncTask.java:288)
F/art (30478): art/runtime/thread.cc:1105] at void
java.util.concurrent.FutureTask.run() (FutureTask.java:237)
F/art (30478): art/runtime/thread.cc:1105] at void
java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker)
(ThreadPoolExecutor.java:1112)
F/art (30478): art/runtime/thread.cc:1105] at void
java.util.concurrent.ThreadPoolExecutor$Worker.run()
(ThreadPoolExecutor.java:587)
F/art (30478): art/runtime/thread.cc:1105] at void
java.lang.Thread.run() (Thread.java:818)
F/art (30478): art/runtime/thread.cc:1105]