I am facing a strange issue that Google maps location service(Place API) is not working when I build application in release mode while it works perfectly in debug builds. I am guessing that applying proguard rules may have created this issue tried changing proguard rules but still the issue.
My build file is like:
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
ext.alwaysUpdateBuildId = false
}
}
My proguard rules are: Proguard Rule
I have checked the log and found that LatLong are coming fine in release build too but after that Maps API are not responding (could not found any thrown exception) but something like
I/GeoApiContext: Request: {0}
AsyncTask for getting place detail using LatLong: REtrieveAddressAsyncTask
[EDIT]
I confirmed that API_KEY is not thee issue here because when I built my release APK removing Proguard rule and disabling MinifyEnabled, Geolocation api started working, so I guess something I am doing wrong in my Proguard rules and couldn't find that.