I am getting below error in dependencies tag in my pom.xml file.
Missing artifact com.google.android.gms:google-play-services:jar:13.0.0
Missing artifact com.google.android.gms:google-play-services:apklib:13.0.0
Here is my Pom.xml dependencies tag, where I am getting error(Check ERROR HERE line)
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r7</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android-test</artifactId>
<version>4.1.1.4</version>
</dependency>
<dependency>
<groupId>com.google.android.maps</groupId>
<artifactId>maps</artifactId>
<version>17_r3</version>
<scope>provided</scope>
</dependency>
<dependency> //ERROR HERE
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>13.0.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>13.0.0</version>
<type>jar</type>
</dependency>
</dependencies>
It seems that the path com.google.android.gms does not exist in the central Maven repository.
I found that I was able to resolve this by downloading the Google Repository extras package found in the Android SDK Manager. (NOTE I am using Android Studio which I believe automatically picks up this repository otherwise you may have to copy some files into your local m2 repo or configure your pom/build file accordingly :S)
It looks to install all versions of the library using an understandable semantic version (instead of their regular r13/'13.0.0` style) so you will have to set your version number accordingly (currently at version 4.2.42 at time of writing)
It would be nice if Google provided (and documented) a public repository for these artifacts, or even better had them published on maven central (as Dallas187 stated) but I'm sure there is probably some legal tarpit that they have to cross before this can happen...
Related
I'm developing on android studio to do some stuff with geofire.
Apparently it can download the entire bundle and all, but it still gives me the message that it wouldn't. I really don't know what the error message means and how to solve the issue. I stepped into the repositories and saw all the files are there. And I do not have enough details on the process, so I could have a better understanding what could be the error.
Please help.
Here is my little experimental project to understand the error better.
<?xml version="1.0" encoding="UTF-8"?>
4.0.0
<groupId>org.example</groupId>
<artifactId>GreenMeadow</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>14</maven.compiler.source>
<maven.compiler.target>14</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.firebase</groupId>
<artifactId>geofire-android</artifactId>
<version>3.2.0</version>
<scope>pom</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>central</id>
<name>Maven Central</name>
<layout>default</layout>
<url>https://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>firebase</id>
<url>https://dl.bintray.com/firebase/geofire/</url>
</repository>
<repository>
<id>google</id>
<url>https://maven.google.com/</url>
</repository>
</repositories>
As I said, it downloads the library but still comes up with the following error:
Failure to find com.firebase:geofire-android:jar:3.2.0 in https://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 . Try to run Maven import with -U flag (force update snapshots)
Then there is the original project with another POM and similar error of a dependent library that actually exists in the repository as well.
<?xml version="1.0" encoding="UTF-8"?>
4.0.0
<groupId>ai.spkf</groupId>
<artifactId>spkf-tools</artifactId>
<version>0.1.0</version>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<dependencies>
<dependency>
<groupId>ai.spkf</groupId>
<artifactId>spkf-sdk</artifactId>
<version>0.1.0-gson</version>
</dependency>
<dependency>
<groupId>ai.spkf</groupId>
<artifactId>spkf-lodar-services</artifactId>
<version>0.1.0</version>
</dependency>
<!-- Gson: Java to Json conversion -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>6.14.0</version>
</dependency>
<dependency>
<groupId>com.firebase</groupId>
<artifactId>geofire-java</artifactId>
<version>3.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.13.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.13.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.13.3</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>google</id>
<url>https://maven.google.com/</url>
</repository>
<repository>
<id>firebase</id>
<url>https://dl.bintray.com/firebase/geofire/</url>
</repository>
</repositories>
Failure to find com.firebase:geofire-java:pom:3.0.0 in https://maven.google.com/ was cached in the local repository, resolution will not be reattempted until the update interval of google has elapsed or updates are forced
The library does not exist in the google repos but should be available in the other one.
Please advice, I'm losing it!
Thanks
I built an Android Wear app in Android Studio, but now decided to build it with Maven. There were no compilation errors when building in Android Studio. But now, I am facing the following error when building with Maven:
[INFO] [path-to-project]\target\unpacked-libs\com.google.android.support_wearable_aar_1.0.0\res\values\values.xml:127: error: Error: No resource found that matches the given name: attr 'android:windowSwipeToDismiss'.
[ERROR] Error when generating sources.
Here are the dependencies I am using:
<!-- Android -->
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.4W.2_r2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v13</artifactId>
<version>21.0.0</version>
<type>aar</type>
<exclusions>
<exclusion>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- /Android -->
<!-- Android Wear Support -->
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services-wearable</artifactId>
<version>7.0.0</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>22.0.0</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.google.android.support</groupId>
<artifactId>wearable</artifactId>
<version>1.0.0</version>
<type>aar</type>
<exclusions>
<exclusion>
<groupId>com.android.support</groupId>
<artifactId>recyclerview-v7</artifactId>
</exclusion>
<exclusion>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
</exclusion>
</exclusions>
</dependency>
Apparently android:windowSwipeToDismiss is not identifiable. I noticed that this attribute was added in API level 20 or so. But the target is set to 21 in my Manifest.xml. Thanks for your help!
The problem was due to the SDK version of the Android Maven Plugin. The error was happening because the sdk version was declared in Android Resources Plugin instead of AMP (typo).
I would like to integrate cucumber into an android-test project which uses maven as a build system.
The test-project is separated from the main project, and it only contains the robotium-based functional tests. I followed this tutorial and the examples here, but during the testing phase I got: 0 tests found..
Any ideas? Thanks in advance.
Erik.
I don't recommend this links, but please mind that you have to make all of cucumber dependency to compile scope. Use Junit4 which going to give duplicationDependency, but use this command to build:
build command: mvn clean install -Dandroid.extractDuplicates=true
part of pom.xml
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>compile</scope>
</dependency>
<!-- cucumber -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-android</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.1.5</version>
<scope>compile</scope>
</dependency>
</dependencies>
part of AndroidManifest.xml content (application's id, what you want to be tested com.myproject.android):
<instrumentation
android:name="cucumber.api.android.CucumberInstrumentation"
android:targetPackage="com.myproject.android" />
I faced following issue. Sometimes I want to add dependency to apklib in my Android project, but if this library has own dependencies that are not declared in its own pom file I get the error.
For example
<dependency>
<groupId>com.google.maps.android</groupId>
<artifactId>android-maps-utils-apklib</artifactId>
<version>0.3</version>
<type>apklib</type>
</dependency>
it links us to http://repo2.maven.org/maven2/com/google/maps/android/android-maps-utils-apklib/0.3/android-maps-utils-apklib-0.3.pom
It's really need for correct work following dependencies
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.4.2_r2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>19.0.1</version>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>14.0.0</version>
</dependency>
that are missing in android-maps-utils-apklib-0.3.pom
So, after I add android-maps-utils-apklib dependency, IDE tells me that this apklib needs own dependencies (e.g. android core that is already added to root project).
It means that I have my own project (PROJ) that has some adpklib dependency (D), where D needs some libs D1, D2, D3. They are not declared in pom file for D, but they are declared in pom for PROJ but it doesn't help.
So the question is how I can add missing dependencies for D?
I am using android-maven-plugin to manage my android project. But maven doesn't package the thirdparty jars when generating the apk. How should I configue the pom.xml?
I use Fat Jar, it's a eclipse plugin could help to include jar to your apk when you export.
very easy to use.
You can find it here:
http://fjep.sourceforge.net/
This example maybe can helps, on this I add ORM-Lite , ABS and JUnit libs:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.0.1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android-test</artifactId>
<version>4.0.1.2</version>
<scope>provided</scope>
</dependency>
<!-- orm-lite dependecies -->
<dependency>
<groupId>com.j256.ormlite</groupId>
<artifactId>ormlite-android</artifactId>
<version>4.35</version>
</dependency>
<dependency>
<groupId>com.j256.ormlite</groupId>
<artifactId>ormlite-core</artifactId>
<version>4.35</version>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>library</artifactId>
<version>4.1.0</version>
<type>apklib</type>
</dependency>
</dependencies>
</dependencyManagement>