0

I have been trying relentlessly to use this library. Everytime I add it, I lose all android.support.v4 and com.google.android.gms.maps cababilities. There is very little documentation for this library.

Is there any tutorial that I have overlooked in my extensive Google searching?

Here's my gradle file:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services:6.5.87'
    compile 'com.androidmapsextensions:android-maps-extensions:2.2.0'
}

Also, I was using the raw code. Just found a jar on the net. Should I be using that instead?

jb15613
  • 359
  • 4
  • 12
  • "Everytime I add it, I lose all android.support.v4 and com.google.android.gms.maps cababilities" -- how did you add it? Can you post your `build.gradle` file where you show your `dependencies` closure? – CommonsWare Mar 02 '15 at 18:08
  • I've tried quite a few ways. I'm at my daughter's dentist and away from my code. Will report back later – jb15613 Mar 02 '15 at 18:21
  • Updated question with gradle file – jb15613 Mar 02 '15 at 19:14
  • OK, that seems fine. When you say "I lose all android.support.v4 and com.google.android.gms.maps cababilities", what do you mean? – CommonsWare Mar 02 '15 at 19:19
  • I get errors on all imports that contain them.. – jb15613 Mar 02 '15 at 19:19
  • I just created a brand new project via the Android Studio 1.1 new project wizard, accepting all defaults. I then pasted your `dependencies` closure in lieu of the generated one in `app/build.gradle`. I can reference imports from `support-v4` and `play-services` without issue. I suggest you try the same. If your new project can import correctly, then something else is screwed up in your original project. If your new project has the same problem, there is something in your environment that is causing your issue. – CommonsWare Mar 02 '15 at 19:24
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/72085/discussion-between-jb15613-and-commonsware). – jb15613 Mar 02 '15 at 19:27
  • You should provide more details about your issue. A screen-shot showing errors you are seeing maybe? – MaciejGórski Mar 02 '15 at 19:41
  • All imports as stated above are underlined and AS says they are unused. For instance, support4.drawerlayout cannot be found or something of that sort. In your library description you tell us that we need to reorganize a few imports, but you don't say which ones, or what they should be changed to. – jb15613 Mar 02 '15 at 19:46
  • Okay, a reboot of pc solved issue. Don't really know what went wrong. Thanks for all your help. Looking through the demo code it looks nice and easy to implement! Somebody can lock or delete this question. – jb15613 Mar 02 '15 at 21:25

1 Answers1

0

what conflict you that you are using two dependencies with common function

compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.androidmapsextensions:android-maps-extensions:2.2.0'

when you using it in your application make sure which library imported

example

you try use GoogleMap

you have two options in import

import com.google.android.gms.maps.GoogleMap;
                 **OR**
import com.androidmapsextensions.GoogleMap;
.........
...

private GoogleMap map; 

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

   // options instance from MarkerOptions
   // choose map extensions if you want pass data by setData method
    map.addMarker(options).setData(data);

}

Summary

Organize your imports as your need from google map libraries

Mina Fawzy
  • 20,852
  • 17
  • 133
  • 156