Comments (16)
Worth noting there's an Android Developer Tools bug open for this on their end. It's likely that you won't have to fix anything on your end.
https://code.google.com/p/android/issues/detail?id=66109
from android-maps-utils.
thanks for sharing it, hope it will be fixed in 0.4....
from android-maps-utils.
Have you found a workaround for this?
from android-maps-utils.
@dbachelder I added a little hack to my build script. Hope this helps
https://gist.github.com/goldierox/9533466
from android-maps-utils.
Pay attention, in Android Studio 0.5.1, with Gradle 0.9 I have different exploded build dir
That's my working build.gradle
apply plugin: 'android'
final BASE_PACKAGE_NAME = 'com.mycompany.appname.android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.2"
final DEBUG_PROVIDER = "${BASE_PACKAGE_NAME}.provider.debug";
defaultConfig {
minSdkVersion 15
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
buildConfigField "String", "AUTHORITY", "\"${DEBUG_PROVIDER}\""
}
release {
}
}
applicationVariants.all{ variant ->
// This is an annoying hack to get around the fact that the Gradle plugin does not support
// having libraries with different minSdkVersions. Play Services has a min version of 9 (Gingerbread)
// but Android Maps Utils supports 8 (Froyo) still
variant.processManifest.doFirst {
File manifestFile = file("${buildDir}/exploded-aar/com.google.maps.android/android-maps-utils/0.3/AndroidManifest.xml")
if (manifestFile.exists()) {
println("Replacing minSdkVersion in Android Maps Utils")
String content = manifestFile.getText('UTF-8')
content = content.replaceAll(/minSdkVersion="8"/, 'minSdkVersion=\"9\"')
manifestFile.write(content, 'UTF-8')
println(content)
}
}
}
}
dependencies {
compile 'com.google.android.gms:play-services:4.2.42'
compile 'com.android.support:support-v4:19.0.1'
compile 'com.google.maps.android:android-maps-utils:0.3+'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
from android-maps-utils.
Thanks guys, it worked!
from android-maps-utils.
@broady Just notice #75 then found this. do you have a snapshot build of the lib pushed somewhere so that we can remove our manifest munging hack? Thanks!
from android-maps-utils.
Any idea how one might use this workaround for a library project with such a dependency?
I've got a CastCompanionLibrary (for Chromecast) which depends on Google's Play-Services, which are also minSdk 9.
It looks like android-library modules don't support applicationVariants..
from android-maps-utils.
How come you still need the workaround? Use v0.3.1
from android-maps-utils.
Sorry, gradle noob here.
I don't understand what you mean by "Exclude the older transitive dependency", and I'm not exactly sure why I still need this workaround. Do you mean Gradle v0.3.1? I'll check what I'm using.
Edit: Clearly you don't mean Gradle v0.3.1, given I'm using v0.9.+. As for Play Services, I'm using v4.3.+
from android-maps-utils.
@timusus broady meaned to use android-maps-utils v0.3.1. It has the minSdkVersion conflict bug fixed.
from android-maps-utils.
Oh, my issue isn't with maps, but with Play Services.
Sorry, I should have guessed Broady was talking about maps.
from android-maps-utils.
I don't really understand, @timusus. What's your issue with Play Services?
from android-maps-utils.
@broady the exact same issue as with maps.
com.google.android.gms:play-services:4.3.+ uses minSdk 9, whereas I'm trying to support minSdk 8.
The app won't compile, for the same reason you struggled with maps 0.3.0. The thing is, I'm using a library project which depends on play-services, and I'm struggling to apply your workaround to that library.
from android-maps-utils.
Sorry, this library only supports minSdk 9.
You could try changing the dependency on play-services to 4.1.32, which was the last version that supported minSdk=8.
from android-maps-utils.
No, 4.3+ is required for other reasons.
It's OK, currently I'm just setting mindSdk = 9 and forgetting about older API's. I would've thought the same workaround you used with maps would work here - but because it's a library project, it doesn't.
I tried using libraryVariants and replacing the manifest's minSdk, but I can't seem to get it working.
Anyway, thanks for your help. I hit you up in hangouts if you had any other suggestions.
from android-maps-utils.
Related Issues (20)
- Add support for Advanced Markers HOT 1
- Ability to specify `anchor` marker option for `ClusterItem`
- Refdocs stuck at v3.4.0 HOT 3
- Change documentation link to GitHub page HOT 1
- Set documentation title as "android-maps-utils" HOT 1
- A lot of unnecessary warnings HOT 1
- Add StreetViewSource parameter to fetchStreetViewData HOT 2
- Remove outdated CHANGELOG.md file HOT 2
- Add kml layer in compose HOT 1
- Creating Kotlin demos for android-maps-utils
- Add Header Check to android-maps-utils
- Improve javadoc descriptions to marker clustering algorithms
- java.lang.IllegalArgumentException : Unmanaged descriptor HOT 3
- Android Map development encountered Google Map deadlock issue: HOT 3
- Incorrect operation of the marker information window HOT 3
- Multiple google api keys (MAPS_API_KEY) per Application HOT 1
- Odd cluster behavior during clustering HOT 1
- Add AdvancedMarkerManager Collection HOT 2
- setOnMarkerDragListener does not report marker drag event HOT 2
- Google Maps is not loading on Android 8 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-maps-utils.