Comments (7)
implementation 'io.github.ponnamkarthik:richlinkpreview:1.0.9'
java.lang.NoSuchMethodError: No static method get()Lcom/squareup/picasso/Picasso; in class Lcom/squareup/picasso/Picasso;
from richlinkpreview.
I'm having thesame issue, using implementation 'io.github.ponnamkarthik:richlinkpreview:1.0.8'
does not work adding the decencies name given on stack-trace does not solve this. Below is a log that may be of help
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
Process: ng.appname.appname, PID: 22317
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jsoup/Jsoup;
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.doInBackground(RichPreview.java:42)
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.doInBackground(RichPreview.java:35)
at android.os.AsyncTask.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jsoup.Jsoup" on path: DexPathList[[zip file "/data/app/ng.appname.appname-1/base.apk", zip file "/data/app/ng.appname.appname-1/split_lib_dependencies_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_0_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_1_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_2_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_3_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_4_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_5_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_6_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_7_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_8_apk.apk", zip file "/data/app/ng.appname.appname-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/ng.appname.appname-1/lib/arm64, /data/app/ng.appname.appname-1/base.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/ng.appname.appname-1/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.doInBackground(RichPreview.java:42)
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.doInBackground(RichPreview.java:35)
at android.os.AsyncTask.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
On adding the two dependencies, app crashes with the below log pointing to picaso.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ng.appname.appname, PID: 14071
java.lang.NoSuchMethodError: No static method with(Landroid/content/Context;)Lcom/squareup/picasso/Picasso; in class Lcom/squareup/picasso/Picasso; or its super classes (declaration of 'com.squareup.picasso.Picasso' appears in /data/app/ng.appname.appname-2/split_lib_dependencies_apk.apk)
at io.github.ponnamkarthik.richlinkpreview.RichLinkViewTwitter.initView(RichLinkViewTwitter.java:83)
at io.github.ponnamkarthik.richlinkpreview.RichLinkViewTwitter$2.onData(RichLinkViewTwitter.java:162)
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.onPostExecute(RichPreview.java:156)
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.onPostExecute(RichPreview.java:35)
at android.os.AsyncTask.finish(AsyncTask.java:663)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:680)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
I guess there is a breaking change in picaso against the version you used in building this
from richlinkpreview.
I second @Savrov post. adding those dependencies with those specific versions does fix the problem. like @olyjosh said updates to those dependencies may be causing breaking changes to your library. I may try to fix these issues myself and submit a pull request but for right now adding those dependencies work well enough for me.
from richlinkpreview.
@ponnamkarthik seems this library using previous version of Picasso. It has different method when initializing the Picasso.
Picasso 2.7++
Picasso.get().load("http://i.imgur.com/DvpvklR.png").into(imageView);
Older version of Picasso need to parse Context
.
Further reading:
https://futurestud.io/tutorials/picasso-how-to-use-migrate-to-picassos-upcoming-3-x-version
from richlinkpreview.
I you want to add this library to your app you only need to add
implementation 'io.github.ponnamkarthik:richlinkpreview:1.0.8'
this to you project
remaining two dependencies are already included in library gradle file
from richlinkpreview.
Any solution for this issue.......?
from richlinkpreview.
I already had picasso dependency in my project so the only error i got was with jsoup.
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jsoup/Jsoup;
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.doInBackground(RichPreview.java:42)
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.doInBackground(RichPreview.java:35)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jsoup.Jsoup" on path: DexPathList[[zip file "/data/app/ng.com.devloop.stirp-3LHyXhiAlF4S7Pp_VYJEJA==/base.apk"],nativeLibraryDirectories=[/data/app/ng.com.devloop.stirp-3LHyXhiAlF4S7Pp_VYJEJA==/lib/arm, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.doInBackground(RichPreview.java:42)
at io.github.ponnamkarthik.richlinkpreview.RichPreview$getData.doInBackground(RichPreview.java:35)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
--------- beginning of system
from richlinkpreview.
Related Issues (20)
- Not getting twitter preview
- RichLinkViewTelegram : Not getting preview as onSuccess is called only when title is empty
- How to integrate own layout? HOT 4
- RichLinkPreview is not shwing on relaese build
- Not getting skype preview
- Issue while using in recyclerview HOT 8
- unable to handle MalformedException HOT 5
- Not Getting Youtube Link previews HOT 3
- https://parler.com url use then crash app
- Unable to create RichLinkViewTelegram fromMeta
- Ios Library
- Caching HOT 1
- Cache preview HOT 1
- Please notify in the readme that in order to install this library, one needs to have jcenter in their graddle repositories. HOT 1
- does not works well inside recyclerView HOT 1
- Url Start with www or http://
- The link's results are not being returned, and a timeout error is being thrown.
- Not Compatible Anymore HOT 4
- illegal character in path at index 0: {{metaservice.metaImage()}} HOT 1
- How to change background card color HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from richlinkpreview.