Maven cannot find external jar's annotations - android

I'm converting a simple android app to Maven, and I've hit a snag with a 3rd party jar (ActiveAndroid) that contains an annotation class that I'm using within my code. I've confirmed that the jar does contain the annotations class files, and the jar works fine when I include it in the libs directory, and compile with Eclipse.
Here's my 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.danh32</groupId>
<artifactId>testapp</artifactId>
<version>1.0</version>
<packaging>apk</packaging>
<name>testapp</name>
<properties>
<platform.version> 4.1.1.4</platform.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${platform.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>
<version>4.2.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.activeandroid</groupId>
<artifactId>activeandroid</artifactId>
<version>LATEST</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.5.0</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>16</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
And here's my compilation error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.339s
[INFO] Finished at: Wed Apr 10 14:18:51 CDT 2013
[INFO] Final Memory: 17M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project testapp: Compilation failure: Compilation failure:
[ERROR] /Users/danh32/code/android/workspace-android/TestApp/src/com/danh32/testapp/db/DSLocation.java:[9,43] cannot find symbol
[ERROR] symbol : class ConflictAction
[ERROR] location: #interface com.activeandroid.annotation.Column
[ERROR] /Users/danh32/code/android/workspace-android/TestApp/src/com/danh32/testapp/db/DSLocation.java:[15,32] cannot find symbol
[ERROR] symbol : method unique()
[ERROR] location: #interface com.activeandroid.annotation.Column
[ERROR] /Users/danh32/code/android/workspace-android/TestApp/src/com/danh32/testapp/db/DSLocation.java:[15,47] cannot find symbol
[ERROR] symbol : method onUniqueConflict()
[ERROR] location: #interface com.activeandroid.annotation.Column
[ERROR] /Users/danh32/code/android/workspace-android/TestApp/src/com/danh32/testapp/db/DSLocation.java:[15,66] cannot find symbol
[ERROR] symbol : variable ConflictAction
[ERROR] location: class com.danh32.testapp.db.DSLocation
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
I'm just starting out with Maven and compiling Android apps outside of Eclipse, so I'm sure I'm missing something simple. Any nudge in the right direction is highly appreciated!
Thanks!

You're using LATEST. Is it possible you have more than one version of that artifact, and Maven is picking up a different one from Eclipse?

it doesn't look like the active android artifact is available in the Maven Central Repo (see this search). You can install that jar in your own local repository (using mvn install-file but that will only work on your local machine. Alternatively you can deploy that artifact to a repository that you control and reference that in your POM.

Have you considered class version problem? Just speculating, but it could be that the jar was built using 1.6 JDK (target 1.6) Your POM has specified the source and target as 1.5, considering you are also using 1.5 JDK, it is possible that the compiler is simply not able to read the classes in your jar file compiled with 1.6

Related

NullPointerException when trying build a android application with maven and plugin com.jayway.maven.plugins.android.generation2

I am trying building a android application with maven and 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>org.kleber</groupId>
<artifactId>app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>app</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform.version> 4.1.1.4</platform.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${platform.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.8.2</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>
<emulator>
<avd>avd</avd>
</emulator>
</configuration>
</plugin>
</plugins>
</build>
</project>
and keeping getting this error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.213 s
[INFO] Finished at: 2019-09-25T22:03:34-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.2:generate-sources (default-generate-sources) on project app: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.2:generate-sources failed.: NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Anyone can tell what's the problem here?

Maven Compilation Error package R does not exists

I am getting package R does not exist on building pom.xml file.
Compilation Error is:
[INFO] Compiling 12 source files to E:\My_Work6\AtosListReq\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] E:\My_Work6\MyListReq\src\com\as\dragsortandswipe\DragSortListView.java:[32,23] error: cannot find symbol
[ERROR] symbol: class R
location: package com.as.listreq
E:\My_Work6\MyListReq\src\com\as\dragsortandswipe\DragSortController.java:[17,23] error: cannot find symbol
[ERROR] symbol: class R
location: package com.as.listreq
E:\My_Work6\MyListReq\src\com\as\dragsortandswipe\DragSortListView.java:[406,6] error: package R does not exist
[ERROR] E:\My_Work6\MyListReq\src\com\as\dragsortandswipe\DragSortListView.java:[409,6] error: package R does not exist
[ERROR] E:\My_Work6\MyListReq\src\com\as\dragsortandswipe\DragSortListView.java:[412,6] error: package R does not exist
[ERROR] E:\My_Work6\MyListReq\src\com\as\dragsortandswipe\DragSortListView.java:[419,29] error: package R does not exist
[ERROR] E:\My_Work6\MyListReq\src\com\as\listreq\NextActivity.java:[41,40] error: package R does not exist
[ERROR] E:\My_Work6\MyListReq\src\com\as\listreq\NextActivity.java:[42,43] error: package R does not exist
.
.
.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project MyListReq: Compilation failure: Compilation failure:
[INFO] 58 errors
Below is my pom.xml file:
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MyListReq</groupId>
<artifactId>MyListReq</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>MyList</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r7</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<fork>true</fork>
<executable>C:\Program Files\Java\jdk1.7.0_03\bin\javac.exe
</executable>
</configuration>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<path>${env.ANDROID_HOME}</path>
<platform>17</platform>
</sdk>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
You have added com.jayway.maven.plugins.android.generation2 plugin,
Adding packaging to apklib, like this:
<version>0.0.1-SNAPSHOT</version>
<packaging>apklib</packaging>
That's ok

Compile error in Android-MenuDrawer

I'm trying to migrate an application developed in Eclipse to Intellij Idea, the application uses ActionBarSherlock and Android-MenuDrawer (SimonVT)
I am having a problem importing the Android-MenuDrawer library using Maven. With ActionBarSherlock compiles fine and I can use it well in a project, but not with MenuDrawer.
When I try to compile with Maven gives me the following error:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/Android/menudrawer/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java:[854,40] cannot find symbol
symbol: variable LAYOUT_DIRECTION_RTL
location: class net.simonvt.menudrawer.MenuDrawer
[ERROR] /D:/Android/menudrawer/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java:[861,40] cannot find symbol
symbol: variable LAYOUT_DIRECTION_RTL
location: class net.simonvt.menudrawer.MenuDrawer
[ERROR] /D:/Android/menudrawer/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java:[873,14] cannot find symbol
symbol: method onRtlPropertiesChanged(int)
[ERROR] /D:/Android/menudrawer/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java:[882,80] cannot find symbol
symbol: variable LAYOUT_DIRECTION_RTL
location: class net.simonvt.menudrawer.MenuDrawer
[ERROR] /D:/Android/menudrawer/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java:[871,5] method does not override or implement a method from a supertype
[ERROR] /D:/Android/menudrawer/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java:[1325,72] cannot find symbol
symbol: variable LAYOUT_DIRECTION_RTL
location: class net.simonvt.menudrawer.MenuDrawer
[ERROR] /D:/Android/menudrawer/menudrawer/src/net/simonvt/menudrawer/ViewHelper.java:[44,57] cannot find symbol
symbol: variable JELLY_BEAN_MR1
location: class android.os.Build.VERSION_CODES
[ERROR] /D:/Android/menudrawer/menudrawer/src/net/simonvt/menudrawer/ViewHelper.java:[45,21] cannot find symbol
symbol: method getLayoutDirection()
location: variable v of type android.view.View
[ERROR] /D:/Android/menudrawer/menudrawer/src/net/simonvt/menudrawer/ViewHelper.java:[48,20] cannot find symbol
symbol: variable LAYOUT_DIRECTION_LTR
location: class android.view.View
I could find the error .
The problem is the dependence of the android sdk , the actal is 4.1.1.4 (api 16) is the last in the maven repository . But the project needs the api 17+
Follow these steps :
1) Download a version of sdk 17+
2) Download the maven-android-sdk-deployer project, and read the instructions for installation
3) Edit the pom.xml file ( the root ) by changing the property 4.1.1.4 and 16
by any of the following , depending on the SDK :
<android.version>4.2.2_r2</android.version>
<android.platform>17</android.platform>
<android.version>4.3_r2</android.version>
<android.platform>18</android.platform>
<android.version>4.4_r1</android.version>
<android.platform>19</android.platform>
and also edit
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${android.version}</version>
</dependency>
by
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>${android.version}</version>
</dependency>
It is also necessary to update the version of maven plugin 3.6.0 to 3.8.0.
Change this:
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<sdk>
<platform>${android.platform}</platform>
</sdk>
</configuration>
<extensions>true</extensions>
</plugin>
by this:
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<sdk>
<platform>${android.platform}</platform>
</sdk>
</configuration>
<extensions>true</extensions>
</plugin>
4) Edit the pom.xml ( the menudrawer folder)
edit the following :
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
by
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
recharge the maven project and compile

Maven android:run error: Activity class does not exist

I prepared the following pom.xml to enable Maven builds for the opensource project MapChange:
<?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>
<artifactId>mapchange</artifactId>
<groupId>com.bricolsoftconsulting</groupId>
<version>0.1.0-SNAPSHOT</version>
<packaging>apklib</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Plugins -->
<jdk.version>1.6</jdk.version>
<api.platform>7</api.platform>
<android-maven-plugin.version>3.6.0</android-maven-plugin.version>
<maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
<!-- Dependencies -->
<android.version>4.1.1.4</android.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
<version>${android.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>${android-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<sdk>
<platform>${api.platform}</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
<lazyLibraryUnpack>true</lazyLibraryUnpack>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
When I run mvn clean install the build finishes successfully.
But when I deploy and run the app to a device using mvn clean install android:deploy android:run the activity cannot be found.
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2: \
android-maven-plugin:3.6.0:run (default-cli) on project mapchange: \
Unable to run launcher Activity: Starting: \
Intent { cmp=com.bricolsoftconsulting.mapchange/.MyMapActivity }
[ERROR] Error type 3
[ERROR] Error: Activity class \
{com.bricolsoftconsulting.mapchange/com.bricolsoftconsulting \
.mapchange.MyMapActivity} does not exist.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven \
with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, \
please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/ \
MAVEN/MojoFailureException
Please notice that I am new to using Maven and the pom.xml might contain misconfigurations.
Finally, I was able to set up a multi-module Maven project. Please find the current (working) implementation here:
https://github.com/johnjohndoe/MapChange/commits/refactor-project-structure

android maven mojoexception

I'm new to Android maven integration in to sonar dashboard. My aim is thru Android JUnit to get the code coverage using Emma and integrate that into sonar dashboard.
I'm facing difficulties in doing that and i'm getting the following exception. When run the development project with the below command
mvn clean install -Pemma
Please find the maven details below,
Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: G:\Projects\apache-maven-3.0.4-bin\apache-maven-3.0.4\bin\..
Java version: 1.6.0, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows vista", version: "6.1", arch: "x86", family: "windows"
http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
<parent>
<groupId>andersen.project</groupId>
<artifactId>Hello-parent</artifactId>
<version>1.0</version>
</parent>
<groupId>andersen.project</groupId>
<artifactId>MyProject</artifactId>
<packaging>apk</packaging>
<version>1.0</version>
<name>MyProject- Application</name>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.0</version>
<scope>system</scope>
<systemPath>E:\android_sdk\add-ons\addon-google_apis-google_inc_-14\libs\maps.jar</systemPath>
</dependency>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<systemPath>E:\android_sdk\platforms\android-14\android.jar</systemPath>
<version>4.0</version>
<scope>system</scope>
</dependency>
<dependency>
<groupId>deps</groupId>
<artifactId>dep1</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${basedir}/libs/acra-4.2.3.jar</systemPath>
</dependency>
<dependency>
<groupId>deps</groupId>
<artifactId>dep2</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${basedir}/libs/GoogleAdMobAdsSdk-6.1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>deps</groupId>
<artifactId>dep3</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${basedir}/libs/GSAndroidSDK.jar</systemPath>
</dependency>
<dependency>
<groupId>deps</groupId>
<artifactId>dep4</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${basedir}/libs/GSAndroidSDK_src.jar</systemPath>
</dependency>
<dependency>
<groupId>deps</groupId>
<artifactId>dep5</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${basedir}/libs/MMBrandedSDK.jar</systemPath>
</dependency>
<dependency>
<groupId>deps</groupId>
<artifactId>dep6</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${basedir}/bin/classes.dex</systemPath>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<profiles>
<profile>
<id>emma</id>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.4.1</version>
<configuration> <!-- emma start -->
<emma>
<enable>true</enable>
<classFolders>${project.basedir}/target/classes/</classFolders>
<outputMetaFile>${project.basedir}/target/emma/coverage.em</outputMetaFile>
</emma> <!-- emma stop -->
<dex>
<noLocals>true</noLocals> <!-- must be set for emma -->
</dex>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.emma.reportPath>target/emma/</sonar.emma.reportPath>
<sonar.surefire.reportsPath>../regalandroid-test/target/surefire-reports</sonar.surefire.reportsPath>
<sonar.core.codeCoveragePlugin>emma</sonar.core.codeCoveragePlugin>
</properties>
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Hello - Parent
[INFO] sourcecode - Application
[INFO] SourceCode - Integration tests
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hello - Parent 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) # Hello-parent ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) # Hello-parent ---
[INFO] Installing G:\Projects\pom.xml to C:\Users\myuser\.m2\repository\andersen\project\Hello-parent\1.0\Hello-parent-1.0.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SourceCode - Application 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.google.android:android:jar:4.0 is missing, no dependency information available
[WARNING] The POM for android:android:jar:4.0 is missing, no dependency information available
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping Hello - Parent
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Hello - Parent .................................... SUCCESS [1.157s]
[INFO] SourceCode - Application ....................... FAILURE [0.348s]
[INFO] SourceCode - Integration tests ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.703s
[INFO] Finished at: Thu Dec 06 13:32:20 IST 2012
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SourceCode: Could not resolve dependencies for project andersen.project:SourceCode:jar:1.0: The following artifacts could not be resolved: com.google.android:android:jar:4.0, android:android:jar:4.0: Failure to find com.google.android:android:jar:4.0 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :SourceCode
It would be great, if anyone give me step by step how to use.
Thanks in Advance

Categories

Resources