问题描述
无法建立项目robospice样本-ormlite内容提供商我用maven:
[错误]未能在项目robospice样本-ormlite化内容provi执行目标
DER:无法解析项目com.octo.android.robospice依赖关系:robos
PICE-样品ormlite内容提供商:APK:1.0.0-SNAPSHOT:找不到神器
com.octo.android.robospice:robospice簧安卓罐:1.4.6-快照 - > [帮帮我
1]
我试过超过2小时,没有运气在网上找到所有的解决方案。任何一个可以请提供Eclipse项目准备和建设?
感谢。
编辑2:的
我使用库,并试图编译示例项目:
EDIT1:的
pom.xml的
<?XML版本=1.0编码=UTF-8&GT?;
<项目的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 GT; com.octo.android.robospice< /的groupId>
<&的artifactId GT; robospice样本-ormlite内容提供商和LT; / artifactId的>
<&版GT; 1.0.0-SNAPSHOT< /版本>
<包装和GT;&APK LT; /包装>
<名称> Robospice - 样品ORMLite + SpringAndroid< /名称>
<描述>演示如何使用ORMLite模块+ ORMLite内容提供商和RoboSpice一个简单的示例。因为它只是一个缓存扩展,我们将与SpringAndroid它结合起来,REST请求< /描述> <性状>
< android.version> 4.1.1.4< /android.version>
<robospice.ormlite.content.provider.version>1.4.6-SNAPSHOT</robospice.ormlite.content.provider.version>
&LT; robospice.spring.android.version&GT; 1.4.6-SNAPSHOT&LT; /robospice.spring.android.version>
&LT; ormlite.content.provider.version&GT; 1.0.2&LT; /ormlite.content.provider.version>
&LT; spring.android.version&GT; 1.0.1.RELEASE&LT; /spring.android.version>
&LT; simplexmlserializer.version&GT; 2.7 LT; /simplexmlserializer.version>
&LT; commons.logging.version&GT; 1.1.3&LT; /commons.logging.version>
&LT; Android的Maven的plugin.version&GT; 3.7.0&LT; /android-maven-plugin.version>
&LT; Maven的编译器plugin.version&GT; 2.3.2&LT; /maven-compiler-plugin.version>
&LT; Maven的清洁plugin.version&GT; 2.5 LT; /maven-clean-plugin.version>
&LT; Maven的依赖,plugin.version&GT; 2.6&LT; /maven-dependency-plugin.version>
&LT; /性状&gt; &LT;依赖和GT;
&LT;&依赖性GT;
&LT;&的groupId GT; com.google.android&LT; /的groupId&GT;
&LT;&的artifactId GT; Android设备和LT; / artifactId的&GT;
&LT;&版GT; $ {android.version}&LT; /版本&GT;
&LT;&范围GT;及提供LT; /&范围GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT; com.octo.android.robospice&LT; /的groupId&GT;
&LT;&的artifactId GT; robospice-ormlite内容提供商和LT; / artifactId的&GT;
&LT;&版GT; $ {robospice.ormlite.content.provider.version}&LT; /版本&GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT; com.octo.android.robospice&LT; /的groupId&GT;
&LT;&的artifactId GT; robospice簧Android和LT; / artifactId的&GT;
&LT;&版GT; $ {robospice.spring.android.version}&LT; /版本&GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT; org.simpleframework&LT; /的groupId&GT;
&LT;&的artifactId GT;简单的XML&LT; / artifactId的&GT;
&LT;&版GT; $ {simplexmlserializer.version}&LT; /版本&GT;
&LT;! - 必须重新申报 - &GT;
&LT;&排除GT;
&LT;&排斥GT;
&LT;&的groupId GT;&XPP3 LT; /的groupId&GT;
&LT;&的artifactId GT;&XPP3 LT; / artifactId的&GT;
&LT; /排除&GT;
&LT;&排斥GT;
&LT;&的groupId GT;&STAX LT; /的groupId&GT;
&LT;&的artifactId GT; STAX的API&LT; / artifactId的&GT;
&LT; /排除&GT;
&LT; /排除&GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT; com.tojc.ormlite.android&LT; /的groupId&GT;
&LT;&的artifactId GT; ormlite内容提供商编译&LT; / artifactId的&GT;
&LT;&版GT; $ {ormlite.content.provider.version}&LT; /版本&GT;
&LT;&范围GT;及提供LT; /&范围GT;
&LT; /依赖性&GT;
&LT; /依赖和GT; &LT;建立&GT;
&LT; sourceDirectory&GT;的src /&LT; / sourceDirectory&GT;
&LT;&插件GT;
&LT;&插件GT;
&LT;附加功能,GT;真&LT; /扩展&GT;
&LT;&的groupId GT; com.jayway.maven.plugins.android.generation2&LT; /的groupId&GT;
&LT;&的artifactId GT; Android的Maven的插件&LT; / artifactId的&GT;
&LT;&版GT; $ {Android的Maven的plugin.version}&LT; /版本&GT;
&LT;结构&gt;
&LT; androidManifestFile&GT; $ {} project.basedir /AndroidManifest.xml</androidManifestFile>
&LT; assetsDirectory&GT; $ {} project.basedir /资产&LT; / assetsDirectory&GT;
&LT; resourceDirectory&GT; $ {} project.basedir / RES&LT; / resourceDirectory&GT;
&LT; nativeLibrariesDirectory&GT; $ {} project.basedir /钢骨混凝土/主/天然的LT; / nativeLibrariesDirectory&GT;
&LT; SDK开发及GT;
&LT;平台和GT; 17&LT; /平台&GT;
&LT; / SDK&GT;
&LT; undeployBeforeDeploy&GT;真&LT; / undeployBeforeDeploy&GT;
&LT; /结构&gt;
&LT; /插件&GT; &LT;&插件GT;
&LT;&的artifactId GT; Maven的编译器插件&LT; / artifactId的&GT;
&LT;&版GT; $ {Maven的编译器plugin.version}&LT; /版本&GT;
&LT;结构&gt;
&lt;信源&GT; 1.6 LT; /源&GT;
&lt;目标&GT; 1.6 LT; /目标与GT;
&LT; /结构&gt;
&LT; /插件&GT;
&LT; /插件&GT;
&LT; /构建&GT; &LT;型材&GT;
&LT;型材&GT;
&LT;&ID GT;皮棉&LT; / ID&GT;
&LT;建立&GT;
&LT;&插件GT;
&LT;&插件GT;
&LT;&的groupId GT; com.lewisd&LT; /的groupId&GT;
&LT;&的artifactId GT;绒Maven的插件&LT; / artifactId的&GT;
&LT;&版GT; 0.0.6&LT; /版本&GT;
&LT;&执行GT;
&LT;执行与GT;
&所述;阶段&gt;验证&下; /阶段&gt;
&LT;目标&GT;
&LT;&目标GT;检查&LT; /目标&GT;
&LT; /目标&GT;
&LT; /执行&GT;
&LT; /处决&GT;
&LT; /插件&GT;
&LT; /插件&GT;
&LT; /构建&GT;
&LT; / profile文件&GT;
&LT;型材&GT;
&LT;&ID GT;蚂蚁&LT; / ID&GT;
&LT;建立&GT;
&LT;&插件GT;
&LT;! - 此配置仅目的是为蚂蚁的兼容性
用户 - &GT;
&LT;&插件GT;
&LT;&的artifactId GT;的maven-清理插件&LT; / artifactId的&GT;
&LT;&版GT; $ {Maven的清洁plugin.version}&LT; /版本&GT;
&LT;结构&gt;
&LT;&文件集GT;
&LT;&文件集GT;
&LT;&目录GT; $ {} project.basedir /库换蚂蚁&LT; /目录&GT;
&所述包括(includes)GT;
&LT;包括方式&gt; *罐子&LT; / - 包括GT;
&LT; / - 包括GT;
&LT;&了FollowSymLinks GT假LT; /&了FollowSymLinks GT;
&LT; /文件集&GT;
&LT; /文件集&GT;
&LT; /结构&gt;
&LT; /插件&GT;
&LT;! - 此配置仅目的是为蚂蚁的兼容性
用户 - &GT;
&LT;&插件GT;
&LT;&的groupId GT; org.apache.maven.plugins&LT; /的groupId&GT;
&LT;&的artifactId GT; Maven的依赖,插件&LT; / artifactId的&GT;
&LT;&版GT; $ {Maven的依赖,plugin.version}&LT; /版本&GT;
&LT;&执行GT;
&LT;执行与GT;
&LT;&ID GT;复制依赖性和LT; / ID&GT;
&LT;阶段&gt;包装及LT; /阶段&gt;
&LT;目标&GT;
&LT;&目标GT;复制依赖性和LT; /目标&GT;
&LT; /目标&GT;
&LT;结构&gt;
&LT;输出目录&GT; $ {} project.basedir /库换蚂蚁&LT; /输出目录&GT;
&LT; overWriteReleases&GT;真&LT; / overWriteReleases&GT;
&LT; overWriteSnapshots&GT;真&LT; / overWriteSnapshots&GT;
&LT; overWriteIfNewer&GT;真&LT; / overWriteIfNewer&GT;
<excludeArtifactIds>xpp3,httpclient,httpcore,android,xmlParserAPIs,opengl-api</excludeArtifactIds>
&LT; /结构&gt;
&LT; /执行&GT;
&LT; /处决&GT;
&LT; /插件&GT;
&LT; /插件&GT;
&LT; /构建&GT;
&LT; / profile文件&GT;
&LT; /型材&GT;
&LT; /项目&GT;
我挖在互联网一会儿就发现所有的类和罐子,这将使这项工作,并最终得到了它的工作。
我已经上传了Robospice内容提供商的我自己的工作版本在这里:
不幸的是,我不得不使用旧版本的罐子,使其工作 - 例如,罐子Android的OrmLiteContentProvider 1.0.4没有工作,因为它不承认@Contract注释(的),因此我不得不添加的1.0.3手动。
在我的git回购ormlitecontentproviderlibrary该文件夹包含Android的OrmLiteContentProvider 1.0.3。
在我的混帐回购协议的文件夹:包含相应的编译器的jar:ormlite内容提供商编译-1.0.3.jar
我在的build.gradle文件链接在一起所有的人都为我的应用程序,使所有相关性回升。
unable to build the project robospice-sample-ormlite-content-provider I use maven:
[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]
I tried for more than 2 hours with all solutions found online with no luck. Can any one please provide the eclipse project ready and built ?
Thanks.
EDIT 2:I use Ropospice library and trying to compile the samples projects:https://github.com/octo-online/robospice
EDIT1:pom.xml
<?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>
I dug around the internet for a while to find all the classes and jars that will make this work and eventually got it working.
I have uploaded my own working version of the Robospice Content Provider here: https://github.com/Winghin2517/RobospiceContentProvider
Unfortunately, I had to use older versions of jars to make it work - for example, jar for Android-OrmLiteContentProvider 1.0.4 did not work as it does not recognise the @Contract annotation (https://github.com/jakenjarvis/Android-OrmLiteContentProvider/issues/21) and therefore I had to add the 1.0.3 manually.
The folder for ormlitecontentproviderlibrary in my git repo contains Android-OrmLiteContentProvider 1.0.3.
The folder in my git repo: https://github.com/Winghin2517/RobospiceContentProvider/tree/master/libs contains the corresponding compiler jar: ormlite-content-provider-compiler-1.0.3.jar
I link all of them together in my build.gradle file for my app so that all dependencies are picked up.
这篇关于未能样订做robospice样本-ormlite内容提供商Robospice的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!