problem with org.mapsforge:mapsforge-map-android-extras:0.6.0

217 views
Skip to first unread message

Alain Bonnefoy

unread,
Jan 12, 2016, 1:28:04 PM1/12/16
to mapsforge-dev
Hello,

I have to add org.mapsforge:mapsforge-map-android-extras:0.6.0 to use MyLocationOverlay().

But when I add it, build fails with the following error:


Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   
> Could not find android.support:compatibility-v4:23.1.1.
     
Searched in the following locations:
         https
://jcenter.bintray.com/android/support/compatibility-v4/23.1.1/compatibility-v4-23.1.1.pom
         https
://jcenter.bintray.com/android/support/compatibility-v4/23.1.1/compatibility-v4-23.1.1.jar
         https
://repo1.maven.org/maven2/android/support/compatibility-v4/23.1.1/compatibility-v4-23.1.1.pom
         https
://repo1.maven.org/maven2/android/support/compatibility-v4/23.1.1/compatibility-v4-23.1.1.jar
         file
:/C:/Users/Alain/Dropbox/Second Guide Developpement/2ndGuide/app/libs/compatibility-v4-23.1.1.jar
         file
:/C:/Users/Alain/Dropbox/Second Guide Developpement/2ndGuide/app/libs/compatibility-v4.jar
         file
:/C:/Users/Alain/AppData/Local/Android/sdk/extras/android/m2repository/android/support/compatibility-v4/23.1.1/compatibility-v4-23.1.1.pom
         file
:/C:/Users/Alain/AppData/Local/Android/sdk/extras/android/m2repository/android/support/compatibility-v4/23.1.1/compatibility-v4-23.1.1.jar
         file
:/C:/Users/Alain/AppData/Local/Android/sdk/extras/google/m2repository/android/support/compatibility-v4/23.1.1/compatibility-v4-23.1.1.pom
         file
:/C:/Users/Alain/AppData/Local/Android/sdk/extras/google/m2repository/android/support/compatibility-v4/23.1.1/compatibility-v4-23.1.1.jar
     
Required by:
         
2ndGuide:app:unspecified > org.mapsforge:mapsforge-map-android-extras:0.6.0



android.support:compatibility-v4:23.1.1 is strange and I didn't found it in the list of available android libraries, I tried to add android.support:support-v4:23.1.1 as I saw in Samples but it seems to be something different.

I do have all sdk 23 installed.

How to solve the problem?

Emux

unread,
Jan 12, 2016, 1:40:51 PM1/12/16
to mapsfo...@googlegroups.com
Normally if you have 'default' transitive dependencies you can use the last child, i.e. mapsforge-map-android-extras.

In any case the needed support lib declaration is seen here.

Do you have installed the 'Android Support Repository' in AS SDK Tools ?

The full lib path would be like:
../Android/Sdk/extras/android/m2repository/com/android/support/support-v4/23.1.1/support-v4-23.1.1.aar

--
Emux

Alain Bonnefoy

unread,
Jan 13, 2016, 7:46:52 AM1/13/16
to mapsforge-dev
Hello Emux,

Yes I have Android Support Repository installed but what surprise me is the name of the expected library -> "android.support:compatibility-v4:23.1.1" and not support-v4

Emux

unread,
Jan 13, 2016, 7:55:18 AM1/13/16
to mapsfo...@googlegroups.com
That naming is used in Maven builds (see here) produced via Maven Android SDK Deployer.

Are you sure there is not a mix in AS Gradle build files in your project?

--
Emux

Alain Bonnefoy

unread,
Jan 13, 2016, 8:45:28 AM1/13/16
to mapsforge-dev
Hello Emux,

I don't think so but where am I supposed to look at?
if you talk about a pom.xml file. I don't have any.


Le mardi 12 janvier 2016 19:28:04 UTC+1, Alain Bonnefoy a écrit :

Emux

unread,
Jan 13, 2016, 9:46:59 AM1/13/16
to mapsfo...@googlegroups.com
The problem arises from the mapsforge-map-android-extras dependencies in Maven / jCenter centrals (where is declared differently as jar vs aar).

To overcome that annoyance you can declare it in Gradle as a non transitive dependency:

    compile('org.mapsforge:mapsforge-map-android-extras:0.6.0') {
        transitive = false
    }

--
Emux
Reply all
Reply to author
Forward
0 new messages