Question

I'm using most recent Sardine https://github.com/lookfirst/sardine WebDav client that uses httpclient 4.2.4 I'm trying to make is work on 4.1.1.4 that uses httpclient 4.0.1

With exclusions it build perfectly

    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>${platform.version}</version>
        <scope>provided</scope>
        <exclusions>
            <exclusion>
                <artifactId>httpclient</artifactId>
                <groupId>org.apache.httpcomponents</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.actionbarsherlock</groupId>
        <artifactId>actionbarsherlock</artifactId>
        <version>4.4.0</version>
        <type>apklib</type>
    </dependency>
    <dependency>
        <groupId>com.j256.ormlite</groupId>
        <artifactId>ormlite-core</artifactId>
        <version>4.47</version>
    </dependency>
    <dependency>
        <groupId>com.j256.ormlite</groupId>
        <artifactId>ormlite-android</artifactId>
        <version>4.47</version>
    </dependency>
    <dependency>
        <groupId>com.github.lookfirst</groupId>
        <artifactId>sardine</artifactId>
        <version>5.0.1</version>
    </dependency>

But during runtime in Sardine init method I get

     AndroidRuntime﹕ FATAL EXCEPTION: main
     java.lang.NoSuchMethodError: org.apache.http.conn.scheme.Scheme.<init>

Meaning most likely it tries to use older version of httpclient. How do I force it using 4.2.4 httpclient version?

No correct solution

OTHER TIPS

Probably doesnt make much sense to exclude a platform provided library, if its there its there

There's a comment on this question - Latest Apache HttpClient in Android SDK - but i dont think that will you.

So I think you're stuck, unless you want to refactor sardine to use the alternate packaging of httpclient mentioned in the post above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top