question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to compile project with osmdroid 6.1.13

See original GitHub issue

Issue Type

[X ] Question

Description and/or steps/code to reproduce the problem

After creating a project following the tutorial on your Wiki (https://github.com/osmdroid/osmdroid/wiki/How-to-use-the-osmdroid-library-(Kotlin)) I’m not able to compile the project. The error message I get:

FAILURE: Build completed with 9 failures.

1: Task failed with an exception.

  • What went wrong: Execution failed for task ‘:app:dataBindingMergeDependencyArtifactsDebug’.

Could not resolve all files for configuration ‘:app:debugCompileClasspath’. Could not find org.osmdroid:osmdroid-android’ ):6.1.13. Required by: project :app > org.osmdroid:osmdroid-wms:6.1.13 project :app > org.osmdroid:osmdroid-mapsforge:6.1.13

Environment

Linux, Android Studio 2021.2.1 Patch 2

If it’s a bug, version(s) of android this affects:

All

Version of osmdroid the issue relates to:

6.1.13

Source code of project can be found here: https://gitlab.com/brmmm3/btmap

My build.gradle in app folder:

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
}

android {
    compileSdk 29

    defaultConfig {
        applicationId "com.greatreset.btmap"
        minSdk 29
        targetSdk 32
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    buildFeatures {
        viewBinding true
    }
    buildToolsVersion '30.0.3'
}

dependencies {
    implementation 'androidx.core:core-ktx:1.8.0'
    implementation 'androidx.appcompat:appcompat:1.5.0'
    implementation 'com.google.android.material:material:1.6.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.5.1'
    implementation 'androidx.navigation:navigation-ui-ktx:2.5.1'

    implementation 'org.osmdroid:osmdroid-android:6.1.13'
    implementation 'org.osmdroid:osmdroid-wms:6.1.13'
    implementation 'org.osmdroid:osmdroid-mapsforge:6.1.13'
    implementation 'org.osmdroid:osmdroid-geopackage:6.1.13'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

gradle build output shows:

...
> Task :app:dataBindingMergeDependencyArtifactsDebug FAILED
Watching 24 directories to track changes
Resource missing. [HTTP GET: https://dl.google.com/dl/android/maven2/org/osmdroid/osmdroid-android'%20)/6.1.13/osmdroid-android'%20)-6.1.13.pom]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/org/osmdroid/osmdroid-android'%20)/6.1.13/osmdroid-android'%20)-6.1.13.pom]
:app:dataBindingMergeDependencyArtifactsDebug (Thread[Execution worker Thread 5,5,main]) completed. Took 0.219 secs.
Resolve mutations for :app:dataBindingMergeGenClassesDebug (Thread[included builds,5,main]) started.
Resolve mutations for :app:dataBindingMergeGenClassesDebug (Thread[included builds,5,main]) completed. Took 0.0 secs.
:app:dataBindingMergeGenClassesDebug (Thread[Execution worker Thread 2,5,main]) started.
...

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:23

github_iconTop GitHub Comments

1reaction
spyhunter99commented, Aug 22, 2022

root cause: the release helper program that is used to automate some of the publishing tasks had a few issues

  • improper parsing of gradle.build files caused by whitespace in dependency declaration
  • duplicate entries for dependencies in generated poms
  • exclusions were defaulting to the artifactId of the module, not the exclusion

i’ll check on the rest of the PR’s then get a release cut shortly.

1reaction
eclecticecommented, Aug 22, 2022

Found issues with POM files for the following OsmDroid packages v6.1.13:

<dependency>
	<groupId>org.osmdroid</groupId>
	<artifactId>osmdroid-android' )</artifactId>
	<version>6.1.13</version>
</dependency>

https://mvnrepository.com/search?q=osmdroid&sort=relevance

osmdroid-wms-6.1.13.pom

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.osmdroid</groupId>
	<artifactId>osmdroid-wms</artifactId>
	<version>6.1.13</version>
	<packaging>aar</packaging>
	<name>osmdroid-wms</name>
	<description>OSMdroid Android WMS Client</description>
	<url>https://github.com/osmdroid/osmdroid</url>
	<inceptionYear>2008</inceptionYear>
	<organization>
		<name>org.osmdroid</name>
		<url>https://github.com/osmdroid/</url>
	</organization>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<id>neilboyd</id>
			<name>Neil Boyd</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>kurtzmarc</id>
			<name>kurtzmarc</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>spyhunter99</id>
			<name>Alex O'Ree</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>MKergall</id>
			<name>Matt Kergall</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:git@github.com:osmdroid/osmdroid.git</connection>
		<developerConnection>scm:git:git@github.com:osmdroid/osmdroid.git</developerConnection>
		<url>https://github.com/osmdroid/osmdroid</url>
	</scm>
	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/osmdroid/osmdroid/issues</url>
	</issueManagement>
	<ciManagement>
		<system>Travis</system>
		<url>https://travis-ci.org/osmdroid/osmdroid</url>
	</ciManagement>
	<distributionManagement>
		<site>
			<id>Github</id>
			<url>https://github.com/osmdroid/osmdroid/releases</url>
		</site>
	</distributionManagement>
	<dependencies>
		<dependency>
			<groupId>org.osmdroid</groupId>
			<artifactId>osmdroid-android</artifactId>
			<version>6.1.13</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.osmdroid</groupId>
			<artifactId>osmdroid-android' )</artifactId>
			<version>6.1.13</version>
		</dependency>
	</dependencies>
</project>

osmdroid-mapsforge-6.1.13.pom

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.osmdroid</groupId>
	<artifactId>osmdroid-mapsforge</artifactId>
	<version>6.1.13</version>
	<packaging>aar</packaging>
	<name>osmdroid-mapsforge</name>
	<description>An Android library to display OpenStreetMap views using Mapsforge. May use non ASF licensed dependencies</description>
	<url>https://github.com/osmdroid/osmdroid</url>
	<inceptionYear>2008</inceptionYear>
	<organization>
		<name>org.osmdroid</name>
		<url>https://github.com/osmdroid/</url>
	</organization>
	<licenses>
		<license>
			<name>LGPLv3</name>
			<url>http://fsf.org</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<id>neilboyd</id>
			<name>Neil Boyd</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>kurtzmarc</id>
			<name>kurtzmarc</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>spyhunter99</id>
			<name>Alex O'Ree</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>MKergall</id>
			<name>Matt Kergall</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:git@github.com:osmdroid/osmdroid.git</connection>
		<developerConnection>scm:git:git@github.com:osmdroid/osmdroid.git</developerConnection>
		<url>https://github.com/osmdroid/osmdroid</url>
	</scm>
	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/osmdroid/osmdroid/issues</url>
	</issueManagement>
	<ciManagement>
		<system>Travis</system>
		<url>https://travis-ci.org/osmdroid/osmdroid</url>
	</ciManagement>
	<distributionManagement>
		<site>
			<id>Github</id>
			<url>https://github.com/osmdroid/osmdroid/releases</url>
		</site>
	</distributionManagement>
	<dependencies>
		<dependency>
			<groupId>org.mapsforge</groupId>
			<artifactId>mapsforge-map-android</artifactId>
			<version>0.11.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.mapsforge</groupId>
			<artifactId>mapsforge-map</artifactId>
			<version>0.11.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.mapsforge</groupId>
			<artifactId>mapsforge-themes</artifactId>
			<version>0.11.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.osmdroid</groupId>
			<artifactId>osmdroid-android</artifactId>
			<version>6.1.13</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.mapsforge</groupId>
			<artifactId>mapsforge-map-android</artifactId>
			<version>0.11.0</version>
		</dependency>
		<dependency>
			<groupId>org.mapsforge</groupId>
			<artifactId>mapsforge-map</artifactId>
			<version>0.11.0</version>
		</dependency>
		<dependency>
			<groupId>org.mapsforge</groupId>
			<artifactId>mapsforge-themes</artifactId>
			<version>0.11.0</version>
		</dependency>
		<dependency>
			<groupId>org.osmdroid</groupId>
			<artifactId>osmdroid-android' )</artifactId>
			<version>6.1.13</version>
		</dependency>
	</dependencies>
</project>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to compile Kotlin project with osmdroid 6.1.13
Found out that the pom files for wms and mapsforge are buggy for versions 6.1.13 and 6.1.12. The discussion can be found here: ......
Read more >
Could not find osmdroid-android-release.aar (org ... - GitHub
i just made an app today with compile 'org.osmdroid:osmdroid-android:5.6.2' and it worked. try deleting the .gradle folder for your project ...
Read more >
osmdroid
NoClassDefFoundError: Failed resolution of: Lorg/osmdroid/bonuspack/R$layout; -- FolderOverlay -- >buildOverlay - #375; Polyline Path too large to render into a ...
Read more >
Newest 'osmdroid' Questions - Problem Solving
Unable to compile Kotlin project with osmdroid 6.1.13. After creating a Kotlin project in Androidstudio following the tutorial on your Wiki ...
Read more >
Index (osmdroid-android 6.0.1 API) - Javadoc.io
Adjust the offsets so that this geo point projects into that pixel. adjustOffsets(BoundingBox) - Method in class org.osmdroid.views.Projection. Deprecated.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found