The build process of android is failing due to this plugin with the following error
```
Error:
479: error: cannot access AbstractSafeParcelable
options.compassEnabled(controls.getBoolean("compass"));
class file for com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable not found
````
duplicate of #1208
fixed this by forking and installing locally, resetting the play store lib versions to '+' as described in the comments for the above issue.
Builds on Android, now figuring out Xcode weirdness.
@Pushplaybang changing the line 48&49 in https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/master/plugin.xml
from
<framework src="com.google.android.gms:play-services-maps:9.8.0" />
<framework src="com.google.android.gms:play-services-location:9.8.0" />
to
<framework src="com.google.android.gms:play-services-maps:+" />
<framework src="com.google.android.gms:play-services-location:+" />
did help
UPDATE:
It's a bad fix since I use a CI, so for now I think I will stay with v1.3.9 and try to fix it in my leasure
@anaganisk - it's working for me on both android and iOS now.
Just setting up Circle CI on my project, what error did you run into with the plugin?
Hi, i'm facing same problem, but it doesn't fix with the
<framework src="com.google.android.gms:play-services-maps:+" />
<framework src="com.google.android.gms:play-services-location:+" />
This is my error
:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/XXX/platforms/android/src/plugin/google/maps/PluginUtil.java:135: error: cannot access AbstractSafeParcelable
Builder builder = LatLngBounds.builder();
^
class file for com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:compileDebugJavaWithJavac
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
>
Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 22.331 secs
Error: /XXX/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/XXX/platforms/android/src/plugin/google/maps/PluginUtil.java:135: error: cannot access AbstractSafeParcelable
Builder builder = LatLngBounds.builder();
^
class file for com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
@braianj no it doesn't because when you compile it the values are changed, instead use the v1.3.9 for now. update your config.xml to use v1.3.9
@anaganisk thanks. Can you tell me how to change the config.xml?
@braianj add this
<plugin name="cordova-plugin-googlemaps" spec="~1.3.9">
<variable name="API_KEY_FOR_ANDROID" value="AIzXXXXXXXXXXXXXXXXXXXXXXXXXKo"/>
</plugin>
and also make sure you delete the plugin prior to that and fresh install.
for me the reason was changing in platforms\android\project.properties
from:
cordova.system.library.1=com.google.android.gms:play-services-location:+
to:
cordova.system.library.1=com.google.android.gms:play-services-location:9.8.0
no adding in config.xml, and in plugin.xml was already
framework src="com.google.android.gms:play-services-maps:9.8.0"
framework src="com.google.android.gms:play-services-location:9.8.0"
Any working fix? with ionic Framework the error is still here :(
nevermind a reinstall did the trick :)
It may occur when the Android SDK Manager is started via $ android and during the upgrade or installation process, the process is stopped with "Ctrl + C" for example, in which case the packages that were being updated should be removed and reinstalled .
How @MTRNord did.
I work-around this with using version 9.6.1 instead of 9.8.0. Using + just uses the latest version available, which if it does work, it may break in the future.
I also had to remove the plugin directory from the /plugins directory, and remove the android platform and re-add the android platform.
doing what @anaganisk suggested resolved my issue. but still don't understand why the issue is triggered? given that i have a copy of the project using the same version that is giving compilation error and it builds fine.
the only change is that i added the push notification plugin. can that cause a conflict?
Most helpful comment
@braianj add this
and also make sure you delete the plugin prior to that and fresh install.