0

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?

4

1 回答 1

1

排除平台提供的库可能没有多大意义,如果它在那里

对这个问题有评论——Android SDK 中的最新 Apache HttpClient——但我认为你不会。

所以我认为你被卡住了,除非你想重构沙丁鱼以使用上面帖子中提到的 httpclient 的替代包装。

于 2013-11-15T23:07:47.430 回答