Im trying to introduce retrofit 2 to my existing app in eclipse.
These are the imported libs:
screenshot
Okhttp shows fetched body correctly.
And this is the error im getting in onFailure callback:
06-22 10:30:18.534: D/Test(5291): No virtual method
newJsonReader(Ljava/io/Reader;)Lcom/google/gson/stream/JsonReader;
in class Lcom/google/gson/Gson; or its super classes (declaration of
'com.google.gson.Gson' appears in /data/app/com.nsrdoc.json-1/base.apk)
Help appreciated
Related
Hi, I am trying to include in my project using react-native-webrtc react native module but I am getting the following error. The main tip is that I got the same error when I used jitsi. Has anyone encountered this problem before? I've never seen a similar anywhere.
1. Application is receiving build success
2. App crashes when runtime
3. Unfortunately I have no more arguments for solving this problem.
E/System: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.content.res.StringBlock.close()' on a null object reference
at android.content.res.ApkAssets.close(ApkAssets.java:201)
at android.content.res.ApkAssets.finalize(ApkAssets.java:191)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:289)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:276)
at java.lang.Daemons$Daemon.run(Daemons.java:137)
at java.lang.Thread.run(Thread.java:929)
I am new to react-native.
We are integrating the react native source code into an existing android project.
We are following the below tutorial :
https://medium.com/mindorks/react-native-integration-with-existing-app-f2757c2e672d
After adding the required react-native classes and following all steps, we are facing some crash issues when we are switching android activity to react-native activity.
Here is the crash issue
Caused by: java.lang.IllegalAccessError: Method 'void
androidx.core.net.ConnectivityManagerCompat.()' is inaccessible
to class 'com.facebook.react.modules.netinfo.NetInfoModule'
(declaration of 'com.facebook.react.modules.netinfo.NetInfoModule'
appears in /data/app/com.ttl.reactintegrationdemo-2/base.apk)
I have an issue in Released APK. java.lang.IncompatibleClassChangeError Error comes when install and open release APK. But my debug APK is working properly. I saw lot of links and stackoverflow question but I didn't got any solution. What should I do?
java.lang.IncompatibleClassChangeError: Class 'org.apache.http.message.BasicHeader' does not implement interface 'org.apache.http.NameValuePair' in call to 'java.lang.String org.apache.http.NameValuePair.getName()' (declaration of 'com.android.volley.toolbox.BasicNetwork' appears in /data/app/com.mypackage.myprojectname-XI7DFLjbpTwZkGhQ3WYiBQ==/base.apk)
at com.android.volley.toolbox.BasicNetwork.convertHeaders(SourceFile:3)
at com.android.volley.toolbox.BasicNetwork.performRequest(SourceFile:8)
at com.android.volley.NetworkDispatcher.run(SourceFile:8)
Any help will be appreciated.
Thanks.
I have added volley library & resolved my issue.
implementation 'com.android.volley:volley:1.1.1'
I been testing the preview of Android P and I'm having some problems with the WifiRttManager used for indoorPositioning. For some reason when I try to use the method startRanging from WifiRttManager but I'm getting this error:
java.lang.NoSuchMethodError: No virtual method startRanging(Landroid/net/wifi/rtt/RangingRequest;Ljava/util/concurrent/Executor;Landroid/net/wifi/rtt/RangingResultCallback;)V in class Landroid/net/wifi/rtt/WifiRttManager; or its super classes (declaration of 'android.net.wifi.rtt.WifiRttManager' appears in /system/framework/framework.jar)
The method displayed by the android studio is the following:
startRanging(RangingRequest rangingRequest, Executor executor, RangingResultCallback callback);
but the documentation https://developer.android.com/reference/android/net/wifi/rtt/WifiRttManager.html has this other one:
startRanging(RangingRequest request, RangingResultCallback callback, Handler handler)
Could you help me to check what's happening please?
I got the same problems.
Updating the Android P to revision 2 using SDK Manager in Android Studio will fix this problem.
In Smack 4.2.1, with used jxmpp-core-0.5.0-alpha7.jar lib I have fetching following issue
com.deep.tasktowerchat fatal error : No interface method lookup(Ljava/lang/Object;)Ljava/lang/Object; in class Lorg/jxmpp/util/cache/Cache; or its super classes (declaration of 'org.jxmpp.util.cache.Cache' appears in /data/app/com.deep.tasktowerchat-1/base.apk)
java.lang.NoSuchMethodError: No interface method lookup(Ljava/lang/Object;)Ljava/lang/Object; in class Lorg/jxmpp/util/cache/Cache; or its super classes (declaration of 'org.jxmpp.util.cache.Cache' appears in /data/app/com.deep.tasktowerchat-1/base.apk)
at org.jivesoftware.smack.sasl.core.ScramMechanism.evaluateChallenge(ScramMechanism.java:179)
at org.jivesoftware.smack.sasl.SASLMechanism.challengeReceived(SASLMechanism.java:245)
at org.jivesoftware.smack.SASLAuthentication.challengeReceived(SASLAuthentication.java:253)
at org.jivesoftware.smack.SASLAuthentication.challengeReceived(SASLAuthentication.java:237)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1091)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:982)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:998)
at java.lang.Thread.run(Thread.java:818)
it's work fine when i was used smack-android-4.2.0-beta3-SNAPSHOT.jar lib on my project but after change the smack lib version it will throw above error.
is it smack or jxmpp library version issue ?
You need to add following lib in your app with same version code. you can download here for more repository and jar file
jxmpp-core-0.5.0.jar
jxmpp-jid-0.5.0.jar
jxmpp-stringprep-libidn-0.5.0.jar
jxmpp-util-cache-0.5.0.jar
Then rebuild and clean your project. i hope it will work.