android - Maven + RoboGuice + ActionBarSherlock + RoboGuice-Sherlock -


i trying create android base project using android-quickstart archetype, , adding roboguice, actionbarsherlock dependencies, plus roboguice-sherlock combine two.

this 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.myapp</groupid>     <artifactid>baseapp</artifactid>     <version>0.0.1-snapshot</version>     <packaging>apk</packaging>     <name>baseapp</name>      <properties>         <project.build.sourceencoding>utf-8</project.build.sourceencoding>         <platform.version> 4.1.1.4         </platform.version>         <android.plugin.version>3.6.0</android.plugin.version>     </properties>      <dependencies>         <dependency>             <groupid>com.google.android</groupid>             <artifactid>android</artifactid>             <version>${platform.version}</version>             <scope>provided</scope>         </dependency>          <dependency>             <groupid>org.roboguice</groupid>             <artifactid>roboguice</artifactid>             <version>2.0</version>         </dependency>          <dependency>             <groupid>com.google.code.findbugs</groupid>             <artifactid>jsr305</artifactid>             <version>1.3.9</version>         </dependency>          <dependency>             <groupid>com.actionbarsherlock</groupid>             <artifactid>actionbarsherlock</artifactid>             <version>4.4.0</version>             <type>apklib</type>         </dependency>           <dependency>             <groupid>com.github.rtyley</groupid>             <artifactid>roboguice-sherlock</artifactid>             <version>1.5</version>         </dependency>      </dependencies>        <build>         <finalname>${project.artifactid}</finalname>         <pluginmanagement>             <plugins>                 <plugin>                     <groupid>com.jayway.maven.plugins.android.generation2</groupid>                     <artifactid>android-maven-plugin</artifactid>                     <version>${android.plugin.version}</version>                     <extensions>true</extensions>                 </plugin>             </plugins>         </pluginmanagement>         <plugins>             <plugin>                 <groupid>com.jayway.maven.plugins.android.generation2</groupid>                 <artifactid>android-maven-plugin</artifactid>                 <configuration>                     <sdk>                         <platform>16</platform>                     </sdk>                 </configuration>             </plugin>         </plugins>     </build> </project> 

but m2eclipse wont work pom.xml, unable find apklib dependency. speficically getting following message under "problems" tab in eclipse:

dependency=[com.actionbarsherlock:actionbarsherlock:apklib:4.4.0:compile] not found in workspace    pom.xml /baseapp    line 1  me.gladwell.eclipse.m2e.android.markers.dependency.apklib 

i have tried removing <type>apklib</type> line abs resources (namely required themes) not imported project.

i've read in several questions apklib type works on command line, , if want stick ide need import abs manually library. did, roboguice crashes because project becomes library project and, apparently, resource ids not final anymore in library projects. (the compile-time error "the value annotation attribute injectview.value must constant expression"). reference, activity:

public class helloandroidactivity extends robosherlockactivity {       @injectview(r.id.helloworld) textview textview;      @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);         textview.settext("roboguice  says hello world");     }  } 

is there proper way create base project these 3 elements using maven , eclipse?

turns out accidentally clicked "is library" checkbox on project properties. works abs manually imported library.

it pity though not being able use maven directly :(


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -