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
Related
I have a project that uses my own .aar library that is uploaded on artifactory.
The .pom file seems to be correct, as I have looked at other .aar libraries available on maven central. The .pom looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>io.modum</groupId>
<artifactId>sweetblueservice</artifactId>
<version>1.15</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>27.1.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.android.support.constraint</groupId>
<artifactId>constraint-layout</artifactId>
<version>1.1.3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.streamsupport</groupId>
<artifactId>android-retrofuture</artifactId>
<version>1.6.3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.jakewharton.timber</groupId>
<artifactId>timber</artifactId>
<version>4.7.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.modum</groupId>
<artifactId>logger-utils</artifactId>
<version>0.1.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.modum</groupId>
<artifactId>sweetblue</artifactId>
<version>2.52.16</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
When I install this library in my local maven repository on my machine, I am able to get the dependency in my Android project like this:
implementation "io.modum:sweetblueservice:1.15"
But somehow, this doesn't work when the library should be resolved from Artifactory:
> Could not find sweetblueservice.jar (io.modum:sweetblueservice:1.15).
Searched in the following locations:
https://modum.jfrog.io/modum/gradle-dev/io/modum/sweetblueservice/1.15/sweetblueservice-1.15.jar
Somehow
Is there any command to execute or UI to see what is stored in my CrudRepository? I am creating a server using Spring which you can add pre-existing users or data into the database when running the server. Client (Android mobile) can also add or update the data of the repository.
Something similar to that of the client side like this:
http://www.coderzheaven.com/2012/01/23/working-with-sqlite-databases-through-command-line-in-android/
Here is 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>spring-rest-service-oauth</artifactId>
<version>0.1.0</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.5.RELEASE</version>
</parent>
<properties>
<spring-security-oauth2.version>2.0.7.RELEASE</spring-security-oauth2.version>
</properties>
<dependencies>
<dependency>
<groupId>com.squareup.retrofit</groupId>
<artifactId>retrofit</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>${spring-security-oauth2.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path-assert</artifactId>
<version>0.9.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-plugin-releases</id>
<url>https://repo.spring.io/plugins-release</url>
</pluginRepository>
</pluginRepositories>
As you can see in your pom.xml you are using HSQLDB which is an embedded database that is most likely running in-memory, started and managed automatically by your Spring Boot app.
You can visualize the content of the database using the HSQL Database Manager GUI.
See here for a HOW-TO guide: View content of HSQLDB embedded database
I am trying to add google play services to existing android maven project using jar and apklib. The project does compile using mvn clean install, but in Eclipse i am getting this error:
Error: No resource found that matches the given name (at 'value' with value '#integer/google_play_services_version'). AndroidManifest.xml /pruebas-bundle-android line 51 Android AAPT Problem
I am new with maven, so i don´t know what could cause this. I have searched for information on the error but have not found anything that could let me solve it. I am using maven 3.2.2 and m2e 1.4. This is my pom.xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.pruebas.pruebas</groupId>
<artifactId>pruebas-bundle-android</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.4.2_r3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v4</artifactId>
<version>20.0.0</version>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>19.0.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>19.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>urbanairship</groupId>
<artifactId>urbanairship-lib</artifactId>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>com.crittercism</groupId>
<artifactId>crittercism-android-agent</artifactId>
<version>LATEST</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>local-repository</id>
<url>file:${basedir}/local-repository</url>
</repository>
</repositories>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.9.0-rc.3</version>
<extensions>true</extensions>
<configuration>
<sdk>
<platform>19</platform>
</sdk>
<manifest>
<debuggable>false</debuggable>
</manifest>
</configuration>
</plugin>
</plugins>
</build>
</project>
The problem seems to be due to the apklib. In Eclipse, i can see all my dependencies jar in Maven dependencies, but i don´t know how to make available the google play services apklib in Eclipse. I would appreciate any help with this.
In order to compile a project with an Android Library (APKLIB) dependency in Eclipse you need to have m2e-android installed and a "Mavenised" copy of the Android Library source code checked-out into your local Eclipse workspace.
When I say "Mavenised" I mean that the Android Library project should have a POM with coordinates (group ID, version, etc.) that match the apklib dependency in you application POM.
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...
As an experiment, I am trying to use maven to build the Google Android market licensing library, sample, and test projects. Here is the pom.xml for the test project:
<?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>etherwalker.example</groupId>
<artifactId>license_test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>apk</packaging>
<name>License - Instrumentation Tests</name>
<parent>
<groupId>etherwalker.example</groupId>
<artifactId>license_parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android-test</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>etherwalker.example</groupId>
<artifactId>license_sample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>apk</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>etherwalker.example</groupId>
<artifactId>license_sample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>maven-android-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
When I run mvn install in that project, I get the following error when the android instrumentation unit tests are run:
[INFO] C:\usr\android-sdk-windows/platform-tools/adb.exe [shell, am, instrument, -w, com.example.android.market.licensing.test/android.test.InstrumentationTestRunner]
com.android.vending.licensing.AESObfuscatorTest:.......
com.android.vending.licensing.ObfuscatedPreferencesTest:INSTRUMENTATION_RESULT: shortMsg=java.security.spec.InvalidKeySpecException
INSTRUMENTATION_RESULT: longMsg=java.security.spec.InvalidKeySpecException: java.io.EOFException: EOF encountered in middle of object
INSTRUMENTATION_CODE: 0
What I really want to know is, where can I find the junit results, and especially the stack trace for the exception?
This error appears when nothing to test (your main project not build).
the structure of your maven project must be:
your_project-parent
|--your_project
|--your_project-it
When
your_project - main project
your_project-parent - parent project
your_project-it - instrumental testing project
You must run mvn install on your_project-perent project.
Then first builds main project then test project.