Our side project: TrakéMoi
The previous blog post solved some basic problems you may have:
Android App With Google Map API V2
Google Play Service 7 installation/upgrade
Option 1
You can either run $ android sdk
, select to install your Google Play Service, also api 16, for some reasons, you may need this to support the play 7.
Option 2
1
2
3
| $ android update sdk --no-ui --force --filter platform-tools,extra-android-support,android-17,sysimg-17,extra-google-google_play_services
$ android update sdk --no-ui --force --filter android-16
|
GMS-MVN help setup
Add the gms-mvn as your git submodule.
.gitmodules
1
2
3
| [submodule "vendor/gms-mvn"]
path = vendor/gms-mvn
url = git://github.com/JakeWharton/gms-mvn-install.git
|
And automate the installation.
setup.sh
1
2
3
4
5
6
7
8
9
| export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/build-tools
git submodule init
git submodule update
git submodule foreach git pull origin master
cp vendor/gms-mvn/gms-mvn-install.sh ${ANDROID_HOME}/extras/google/google_play_services/libproject/google-play-services_lib/
(cd ${ANDROID_HOME}/extras/google/google_play_services/libproject/google-play-services_lib/ && ./gms-mvn-install.sh 7)
|
Update pom.xml
Add Google Play Service 7 to pom, also update the android-maven-plugin to 3.6.0.
pom.xml partially
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>7</version>
<type>apklib</type>
</dependency>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.6.0</version>
|