首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能构建示例Robospice -示例-ormlite内容提供者Robospice

未能构建示例Robospice -示例-ormlite内容提供者Robospice
EN

Stack Overflow用户
提问于 2014-02-18 14:47:51
回答 1查看 393关注 0票数 1

无法构建项目robospice-样例-莫来特-内容提供者,我使用maven:

代码语言:javascript
复制
[ERROR] Failed to execute goal on project robospice-sample-ormlite-content-provi
der: Could not resolve dependencies for project com.octo.android.robospice:robos
pice-sample-ormlite-content-provider:apk:1.0.0-SNAPSHOT: Could not find artifact
com.octo.android.robospice:robospice-spring-android:jar:1.4.6-SNAPSHOT -> [Help
1]

我试了两个多小时,所有的解决方案都在网上找到,没有任何运气。有谁能提供eclipse项目的准备和构建吗?

谢谢。

编辑2:我使用罗波斯库并尝试编译示例项目:https://github.com/octo-online/robospice

EDIT1: pom.xml

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.octo.android.robospice</groupId>
    <artifactId>robospice-sample-ormlite-content-provider</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>apk</packaging>
    <name>Robospice - Sample ORMLite + SpringAndroid</name>
    <description>A simple sample that demonstrates how to use the ORMLite module + ORMLite Content Provider and RoboSpice. As it is only a caching extension, we will combine it with SpringAndroid for REST requests.</description>

    <properties>
        <android.version>4.1.1.4</android.version>
        <robospice.ormlite.content.provider.version>1.4.6-SNAPSHOT</robospice.ormlite.content.provider.version>
        <robospice.spring.android.version>1.4.6-SNAPSHOT</robospice.spring.android.version>
        <ormlite.content.provider.version>1.0.2</ormlite.content.provider.version>
        <spring.android.version>1.0.1.RELEASE</spring.android.version>
        <simplexmlserializer.version>2.7</simplexmlserializer.version>
        <commons.logging.version>1.1.3</commons.logging.version>
        <android-maven-plugin.version>3.7.0</android-maven-plugin.version>
        <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
        <maven-clean-plugin.version>2.5</maven-clean-plugin.version>
        <maven-dependency-plugin.version>2.6</maven-dependency-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.android</groupId>
            <artifactId>android</artifactId>
            <version>${android.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.octo.android.robospice</groupId>
            <artifactId>robospice-ormlite-content-provider</artifactId>
            <version>${robospice.ormlite.content.provider.version}</version>
        </dependency>
        <dependency>
            <groupId>com.octo.android.robospice</groupId>
            <artifactId>robospice-spring-android</artifactId>
            <version>${robospice.spring.android.version}</version>
        </dependency>
        <dependency>
            <groupId>org.simpleframework</groupId>
            <artifactId>simple-xml</artifactId>
            <version>${simplexmlserializer.version}</version>
            <!-- must be re-declared -->
            <exclusions>
                <exclusion>
                    <groupId>xpp3</groupId>
                    <artifactId>xpp3</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>stax</groupId>
                    <artifactId>stax-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.tojc.ormlite.android</groupId>
            <artifactId>ormlite-content-provider-compiler</artifactId>
            <version>${ormlite.content.provider.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/</sourceDirectory>
        <plugins>
            <plugin>
                <extensions>true</extensions>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>android-maven-plugin</artifactId>
                <version>${android-maven-plugin.version}</version>
                <configuration>
                    <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
                    <assetsDirectory>${project.basedir}/assets</assetsDirectory>
                    <resourceDirectory>${project.basedir}/res</resourceDirectory>
                    <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
                    <sdk>
                        <platform>17</platform>
                    </sdk>
                    <undeployBeforeDeploy>true</undeployBeforeDeploy>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>lint</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.lewisd</groupId>
                        <artifactId>lint-maven-plugin</artifactId>
                        <version>0.0.6</version>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ant</id>
            <build>
                <plugins>
                    <!-- This configuration is only meant to provide compatibility for ant 
                        users -->
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <version>${maven-clean-plugin.version}</version>
                        <configuration>
                            <filesets>
                                <fileset>
                                    <directory>${project.basedir}/libs-for-ant</directory>
                                    <includes>
                                        <include>*.jar</include>
                                    </includes>
                                    <followSymlinks>false</followSymlinks>
                                </fileset>
                            </filesets>
                        </configuration>
                    </plugin>
                    <!-- This configuration is only meant to provide compatibility for ant 
                        users -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>${maven-dependency-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>copy-dependencies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.basedir}/libs-for-ant</outputDirectory>
                                    <overWriteReleases>true</overWriteReleases>
                                    <overWriteSnapshots>true</overWriteSnapshots>
                                    <overWriteIfNewer>true</overWriteIfNewer>
                                    <excludeArtifactIds>xpp3,httpclient,httpcore,android,xmlParserAPIs,opengl-api</excludeArtifactIds>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
EN

回答 1

Stack Overflow用户

发布于 2015-06-30 16:50:39

我在互联网上搜索了一段时间,找出了所有的类和罐子,这些类和罐子都能让它发挥作用,并最终让它发挥作用。

我在这里上传了我自己的Robospice内容提供商的工作版本:https://github.com/Winghin2517/RobospiceContentProvider

不幸的是,我不得不使用旧版本的jar来使其工作--例如,用于Android的jar--OrmLiteContentProvider 1.0.4没有工作,因为它不识别@Contract注释(https://github.com/jakenjarvis/Android-OrmLiteContentProvider/issues/21),因此我不得不手动添加1.0.3。

我的git中的ormlitecontentproviderlibrary文件夹包含Android 1.0.3。

我的git:https://github.com/Winghin2517/RobospiceContentProvider/tree/master/libs中的文件夹包含相应的编译器jar:编译器-1.0.3.jar

我将所有这些链接到我的应用程序的build.gradle文件中,以便获取所有的依赖项。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21857254

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档