Reputation: 31
After updating from android SDK(25) to SDK(26), facing many problem. then I want to upgrade to the latest version possible. Currently, work with SDK(28) but I have trouble related google play service map/location. I tried to change library version severally.
Can anyone please help me to fix this ?
This error happens on google map api related code.
Error:
error: cannot find symbol class Place
error: package com.google.android.gms.location.places.ui does not exist
error: package com.google.android.gms.vision.text does not exist
error: cannot find symbol class PlaceSelectionListener
error: cannot find symbol class PlaceAutocompleteFragment
error: method does not override or implement a method from a supertype
error: cannot find symbol class GeoPoint
project - build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
jcenter()
maven {url "https://jitpack.io"}
google()
}
}
app - build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
signingConfigs {
debug {
storeFile file('signature/debug-key.keystore')
}
release {
storeFile file("signature/release-key.keystore")
}
}
defaultConfig {
applicationId "com.lovelain.getfinedustlevel"
minSdkVersion 19
targetSdkVersion 28
multiDexEnabled true
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')
zipAlignEnabled true
debuggable false
}
}
productFlavors {
}
useLibrary('org.apache.http.legacy')
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
}
}
dependencies {
implementation project(':library')
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
Upvotes: 0
Views: 3806
Reputation: 31
Solved,
Updating SDK, not only map/location api but also other parts need.
and related Geopoint problem, it is modify code.
following is app - build.gradle
dependencies {
implementation project(':library')
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation 'com.google.android.gms:play-services-vision:17.0.2'
implementation 'com.google.firebase:firebase-appindexing:16.0.2'
}
thanks for support.
Upvotes: 3