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

Can't load image & getting error "Could not find method com.squareup.okhttp.OkHttpClient.createURLStreamHandler" #763

Closed
Abdelhady opened this issue Nov 20, 2014 · 3 comments

Comments

@Abdelhady
Copy link

@Abdelhady Abdelhady commented Nov 20, 2014

I'm trying to use Picasso, but I'm getting this disappointing error:

11-20 04:34:04.048  22344-22344/com.myApp I/dalvikvm﹕ Could not find method com.squareup.okhttp.OkHttpClient.createURLStreamHandler, referenced from method com.squareup.okhttp.OkUrlFactory.createURLStreamHandler
11-20 04:34:04.048  22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve virtual method 48778: Lcom/squareup/okhttp/OkHttpClient;.createURLStreamHandler (Ljava/lang/String;)Ljava/net/URLStreamHandler;
11-20 04:34:04.048  22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
11-20 04:34:04.048  22344-22344/com.myApp I/dalvikvm﹕ Could not find method com.squareup.okhttp.OkHttpClient.open, referenced from method com.squareup.okhttp.OkUrlFactory.open
11-20 04:34:04.048  22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve virtual method 48800: Lcom/squareup/okhttp/OkHttpClient;.open (Ljava/net/URL;)Ljava/net/HttpURLConnection;
11-20 04:34:04.048  22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
11-20 04:34:04.048  22344-22344/com.myApp I/dalvikvm﹕ Could not find method com.squareup.okhttp.OkHttpClient.open, referenced from method com.squareup.okhttp.OkUrlFactory.open
11-20 04:34:04.048  22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve virtual method 48801: Lcom/squareup/okhttp/OkHttpClient;.open (Ljava/net/URL;Ljava/net/Proxy;)Ljava/net/HttpURLConnection;
11-20 04:34:04.048  22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
11-20 04:34:04.058  22344-22344/com.myApp W/Settings﹕ Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
11-20 04:34:04.068  22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
11-20 04:34:04.068  22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
11-20 04:34:04.068  22344-22344/com.myApp I/dalvikvm﹕ Could not find method java.nio.file.Files.newOutputStream, referenced from method okio.Okio.sink
11-20 04:34:04.068  22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve static method 51348: Ljava/nio/file/Files;.newOutputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream;
11-20 04:34:04.068  22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a
11-20 04:34:04.068  22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
11-20 04:34:04.078  22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
11-20 04:34:04.078  22344-22344/com.myApp I/dalvikvm﹕ Could not find method java.nio.file.Files.newInputStream, referenced from method okio.Okio.source
11-20 04:34:04.078  22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve static method 51347: Ljava/nio/file/Files;.newInputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream;
11-20 04:34:04.078  22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a

here are my gradle dependencies:

    apt "org.androidannotations:androidannotations:3.0+"
    compile 'org.androidannotations:androidannotations-api:3.0+'
    compile 'com.mobsandgeeks:android-saripaar:1.0.2'
    compile 'com.google.guava:guava:17.0'
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'com.android.support:appcompat-v7:20.+'
    compile 'com.google.android.gms:play-services:5.0.+'
    compile 'fr.avianey:facebook-android-api:+@aar'
    compile 'com.squareup.okhttp:okhttp:2.1.0'
    compile 'com.octo.android.robospice:robospice:1.4.13'
    compile 'com.octo.android.robospice:robospice-okhttp:1.4.13'
    compile 'com.googlecode.libphonenumber:libphonenumber:6.3+'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.squareup.picasso:picasso:2.4.0'

& I'm using minSdkVersion 15 if it could help

@JakeWharton
Copy link
Member

@JakeWharton JakeWharton commented Nov 20, 2014

Add okhttp-urlconnection dependency.
On Nov 19, 2014 7:14 PM, "Abdel Hady Muhammad" notifications@github.com
wrote:

I'm trying to use Picasso, but I'm getting this disappointing error:

11-20 04:34:04.048 22344-22344/com.myApp I/dalvikvm﹕ Could not find method com.squareup.okhttp.OkHttpClient.createURLStreamHandler, referenced from method com.squareup.okhttp.OkUrlFactory.createURLStreamHandler
11-20 04:34:04.048 22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve virtual method 48778: Lcom/squareup/okhttp/OkHttpClient;.createURLStreamHandler (Ljava/lang/String;)Ljava/net/URLStreamHandler;
11-20 04:34:04.048 22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
11-20 04:34:04.048 22344-22344/com.myApp I/dalvikvm﹕ Could not find method com.squareup.okhttp.OkHttpClient.open, referenced from method com.squareup.okhttp.OkUrlFactory.open
11-20 04:34:04.048 22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve virtual method 48800: Lcom/squareup/okhttp/OkHttpClient;.open (Ljava/net/URL;)Ljava/net/HttpURLConnection;
11-20 04:34:04.048 22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
11-20 04:34:04.048 22344-22344/com.myApp I/dalvikvm﹕ Could not find method com.squareup.okhttp.OkHttpClient.open, referenced from method com.squareup.okhttp.OkUrlFactory.open
11-20 04:34:04.048 22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve virtual method 48801: Lcom/squareup/okhttp/OkHttpClient;.open (Ljava/net/URL;Ljava/net/Proxy;)Ljava/net/HttpURLConnection;
11-20 04:34:04.048 22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
11-20 04:34:04.058 22344-22344/com.myApp W/Settings﹕ Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
11-20 04:34:04.068 22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
11-20 04:34:04.068 22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
11-20 04:34:04.068 22344-22344/com.myApp I/dalvikvm﹕ Could not find method java.nio.file.Files.newOutputStream, referenced from method okio.Okio.sink
11-20 04:34:04.068 22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve static method 51348: Ljava/nio/file/Files;.newOutputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream;
11-20 04:34:04.068 22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a
11-20 04:34:04.068 22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
11-20 04:34:04.078 22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
11-20 04:34:04.078 22344-22344/com.myApp I/dalvikvm﹕ Could not find method java.nio.file.Files.newInputStream, referenced from method okio.Okio.source
11-20 04:34:04.078 22344-22344/com.myApp W/dalvikvm﹕ VFY: unable to resolve static method 51347: Ljava/nio/file/Files;.newInputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream;
11-20 04:34:04.078 22344-22344/com.myApp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a

here are my gradle dependencies:

apt "org.androidannotations:androidannotations:3.0+"
compile 'org.androidannotations:androidannotations-api:3.0+'
compile 'com.mobsandgeeks:android-saripaar:1.0.2'
compile 'com.google.guava:guava:17.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.google.android.gms:play-services:5.0.+'
compile 'fr.avianey:facebook-android-api:+@aar'
compile 'com.squareup.okhttp:okhttp:2.1.0'
compile 'com.octo.android.robospice:robospice:1.4.13'
compile 'com.octo.android.robospice:robospice-okhttp:1.4.13'
compile 'com.googlecode.libphonenumber:libphonenumber:6.3+'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.squareup.picasso:picasso:2.4.0'

& I'm using minSdkVersion 15 if it could help


Reply to this email directly or view it on GitHub
#763.

@Abdelhady
Copy link
Author

@Abdelhady Abdelhady commented Nov 20, 2014

It worked :)
your response was faster than I ever expected, thanks a lot 👍

@ShahoodulHassan
Copy link

@ShahoodulHassan ShahoodulHassan commented Oct 13, 2019

Is it still a requirement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.