XML弹簧与grandle机器人 [英] xml spring for android with grandle

查看:206
本文介绍了XML弹簧与grandle机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我寻遍了互联网,但我并没有发现新的SimpleXmlHttpMessageConverter任何grandle依赖关系()我在pom.xml文件中的Maven使用它。我可以grandle使用它呢?

Hi I search all over the Internet but I didn't found any grandle dependencies for new SimpleXmlHttpMessageConverter() I use it with maven in pom.xml file. Can I use it with grandle?

我的聚甲醛是

http://maven.apache.org/xsd/maven-4.0.0.xsd>
    4.0.0

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0

<groupId>org.hello</groupId>
<artifactId>gs-consuming-rest-xml-android</artifactId>
<version>0.1.0</version>
<packaging>apk</packaging>
<name>gs-consuming-rest-xml-android</name>

<dependencies>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>4.1.1.4</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-rest-template</artifactId>
        <version>1.0.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.simpleframework</groupId>
        <artifactId>simple-xml</artifactId>
        <version>2.7</version>
        <exclusions>
            <exclusion>
                <artifactId>stax</artifactId>
                <groupId>stax</groupId>
            </exclusion>
            <exclusion>
                <artifactId>stax-api</artifactId>
                <groupId>stax</groupId>
            </exclusion>
            <exclusion>
                <artifactId>xpp3</artifactId>
                <groupId>xpp3</groupId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <version>3.8.2</version>
            <configuration>
                <sdk>
                    <platform>19</platform>
                </sdk>
                <deleteConflictingFiles>true</deleteConflictingFiles>
                <undeployBeforeDeploy>true</undeployBeforeDeploy>
            </configuration>
            <extensions>true</extensions>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>

在我的gradle尝试使用:

In gradle I try to use:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.example.georgiadis.weatherfirstrest"
        minSdkVersion 8
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/notice.txt'
    }
}

    dependencies {
        compile 'com.android.support:appcompat-v7:20.0.0'
        compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
        compile 'org.simpleframework:simple-xml:2.7.1'
    }

当我把我生成需要:

警告:依赖XPP3:XPP3:1.1.3.3被忽略的调试,因为它可以使用Android提供的内部版本冲突。
         在问题的情况下,请与jarjar重新包装更改类包
警告:依赖XPP3:XPP3:1.1.3.3被忽略释放,因为它可以使用Android提供的内部版本冲突。
         在问题的情况下,请与jarjar重新包装更改类包

Warning:Dependency xpp3:xpp3:1.1.3.3 is ignored for debug as it may be conflicting with the internal version provided by Android. In case of problem, please repackage it with jarjar to change the class packages Warning:Dependency xpp3:xpp3:1.1.3.3 is ignored for release as it may be conflicting with the internal version provided by Android. In case of problem, please repackage it with jarjar to change the class packages

推荐答案

最后一行改为

编译com.hannesdorfmann:httpkit-简单XML:1.5.0

这为我工作。其原因是,你简单的XML版本的jar太高

It works for me. The cause is that your simple-xml jar version is too high

这篇关于XML弹簧与grandle机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆