1

I'm trying to build example project from Zigurd Mednieks book "Programming Android. Second Edition" (source at github: https://github.com/bmeike/ProgrammingAndroid2Examples/tree/master/MicroJobs). Example project uses Google Maps API.

I'm using Android Studio 2.1.2, Android 6.X (API 24) emulator. My build.gradle file contents:

    apply plugin: 'com.android.application'
android {
    compileSdkVersion "Google Inc.:Google APIs:23"
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.oreilly.demo.android.pa.microjobs"
        targetSdkVersion "Google Inc.:Google APIs:23"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
dependencies {
    compile 'com.google.android.gms:play-services:9.4.0'
}

AVD info details:

Name: Nexus_9_API_24

CPU/ABI: Intel Atom (x86)

Path: /home/dataminer/.android/avd/Nexus_9_API_24.avd

Target: default [] (API level 24)

Skin: nexus_9

SD Card: 100M

hw.dPad: no

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: Nexus 9

vm.heapSize: 128

hw.device.manufacturer: Google

hw.gps: yes

hw.initialOrientation: landscape

image.androidVersion.api: 24

hw.audioInput: yes

image.sysdir.1: system-images/android-24/default/x86/

tag.id: default

hw.camera.back: none

hw.mainKeys: no

AvdId: Nexus_9_API_24

hw.camera.front: none

hw.lcd.density: 320

runtime.scalefactor: auto

avd.ini.displayname: Nexus 9 API 24

hw.gpu.mode: auto

hw.device.hash2: MD5:b17ec930ff79ac39e6145decb0ebf013

hw.ramSize: 1536

hw.trackBall: no

hw.battery: yes

hw.sdCard: yes

tag.display: 

runtime.network.latency: none

hw.keyboard: yes

hw.sensors.proximity: no

disk.dataPartition.size: 800M

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes

Sync project With Gradle Files step finishes sucessfully, but on project Run I got this error:

    $ adb shell pm install -r "/data/local/tmp/com.oreilly.demo.android.pa.microjobs"
Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl1110332747.tmp/base.apk (at Binary XML file line #7): Requires development platform Google Inc.:Google APIs:23 but this is a release platform.]

How to fix this error?

d7r
  • 107
  • 1
  • 1
  • 12
  • call `compileSdkVersion "23"` instead of `compileSdkVersion "Google Inc.:Google APIs:23"` and `targetSdkVersion 23` – IntelliJ Amiya Aug 11 '16 at 06:37
  • I have tried and receive error "error: package com.google.android.maps does not exist". – d7r Aug 11 '16 at 07:25
  • http://stackoverflow.com/questions/7967549/com-google-android-maps-does-not-exist-strange-error and http://stackoverflow.com/questions/21892743/package-com-google-android-maps-does-not-exist-android-studio – IntelliJ Amiya Aug 11 '16 at 07:40
  • yes . Did you solve yet ? – IntelliJ Amiya Aug 11 '16 at 07:52
  • This is not work. I already have installed Google APis in Android SDK, specify to use com.goole.android.maps in manifest XML and choose Google API as build target (in original build.gradle file). It results in error in main question "Requires development platform Google Inc.:Google APIs:23 but this is a release platform" – d7r Aug 11 '16 at 07:56
  • clean-rebuild-restart-gradle – IntelliJ Amiya Aug 11 '16 at 07:58
  • The same error. $ adb shell pm install -r "/data/local/tmp/com.oreilly.demo.android.pa.microjobs" Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl693462078.tmp/base.apk (at Binary XML file line #7): Requires development platform Google Inc.:Google APIs:23 but this is a release platform.] – d7r Aug 11 '16 at 08:07

0 Answers0