# Ionic package: error when building in ionic cloud

**URL:** <https://forum.ionicframework.com/t/ionic-package-error-when-building-in-ionic-cloud/94173>\
**Category:** ionic-v3\
**Created:** [June 13, 2017, 5:52pm UTC](https://forum.ionicframework.com/t/ionic-package-error-when-building-in-ionic-cloud/94173 "2017-06-13T17:52:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![appuser\_apogeephysic](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@appuser\_apogeephysic](https://forum.ionicframework.com/u/appuser_apogeephysic)\
**Post date:** [June 13, 2017, 5:52pm UTC](https://forum.ionicframework.com/t/ionic-package-error-when-building-in-ionic-cloud/94173/1 "2017-06-13T17:52:23Z")

</div>

Yesterday morning, cloud packaging was working just fine (ionic package build android --profile [my profile name] --release).

Today I received this issue that a few others had as well:

> [@Ionic Package: Error building in ionic cloud getting error Might need to update your Android SDK](https://forum.ionicframework.com/t/ionic-package-error-building-in-ionic-cloud-getting-error-might-need-to-update-your-android-sdk/94015):
>
> ANDROID\_HOME=/opt/android-sdk JAVA\_HOME=/usr/lib/jvm/java-8-oracle Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: /opt/android-sdk/tools/templates/gradle/wrapper Why am I keep getting this error? I am building in cloud aren’t they supposed to look after the things like Android SDK and Java

I upgraded to cordova-android 6.2.3 as requested and it seems to have worked, except now a new error pops up:

> ```auto
> :compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
> /home/package/workspace/[my app]/cordova/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.
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 1 error
> 
> ```

> :compileReleaseJavaWithJavac FAILED  
> FAILURE: Build failed with an exception.

> - What went wrong:  
> Execution failed for task ‘:compileReleaseJavaWithJavac’.
> 
> > 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: 2.698 secs  
> Error: /home/package/workspace/[my app]/cordova/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.  
> /home/package/workspace/[my app]/cordova/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.  
> Note: Some input files use unchecked or unsafe operations.  
> Note: Recompile with -Xlint:unchecked for details.  
> 1 error

> FAILURE: Build failed with an exception.

> - What went wrong:  
> Execution failed for task ‘:compileReleaseJavaWithJavac’.
> 
> > 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.
> 
> ```auto
> 
> ```

Google Maps has had an issue for a long time involving the project.properties file (this appears to be the same issue). The fix for this has always been simple enough, simply changing the instances of “9.8.0” to “+” in platforms/android/project.properties as outlined here:

[http://masteringionic.com/blog/2017-05-24-fixing-googlemaps-android-build-error-with-abstractsafeparcelable-not-found-message/](http://masteringionic.com/blog/2017-05-24-fixing-googlemaps-android-build-error-with-abstractsafeparcelable-not-found-message/)

With this fix it builds locally just fine, this is a fix that I’ve had to use for about 6 months now and have never had an issue with “package build” either. The above error only happens with “package build,” I’m guessing my project.properties file is not being reflected. Anyone know why this is popping up all of a sudden?

I’ve contacted customer support about this and have not received a response.

Thank you

---

<div class="post-metadata">

**Author:** ![appuser\_apogeephysic](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@appuser\_apogeephysic](https://forum.ionicframework.com/u/appuser_apogeephysic)\
**Post date:** [June 13, 2017, 8:59pm UTC](https://forum.ionicframework.com/t/ionic-package-error-when-building-in-ionic-cloud/94173/2 "2017-06-13T20:59:26Z")

</div>

More context for reference:

> <https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1208>

> <https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/323>

As far as I can tell, the `cordova-plugin-googlemaps` dev pinned their `play-services` dependency to `9.8.0` which causes compatibility issues. This is an easy fix locally as all you have to do is change the `platforms/android/project.properties` from

`cordova.system.library.2=com.google.android.gms:play-services-maps:9.8.0`  
`cordova.system.library.3=com.google.android.gms:play-services-location:9.8.0`

(etc for whatever `play-services` are in the properties) to

`cordova.system.library.2=com.google.android.gms:play-services-maps:+ cordova.system.library.3=com.google.android.gms:play-services-location:+`

or, alternatively, to `10.0.0` or something higher.

Easy for me locally but it doesn’t look like I have any control over that when I’m trying to `ionic package build` in the ionic-cloud, do I? I’m almost certain this is the issue but I’m not sure what I can do about it.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [June 13, 2017, 9:38pm UTC](https://forum.ionicframework.com/t/ionic-package-error-when-building-in-ionic-cloud/94173/3 "2017-06-13T21:38:39Z")

</div>

Fork the plugin, make the changes, install it via your Git repo.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [June 14, 2017, 10:00am UTC](https://forum.ionicframework.com/t/ionic-package-error-when-building-in-ionic-cloud/94173/4 "2017-06-14T10:00:27Z")

</div>

Split this topic on June 14, 2017, 10:00am UTC

A post was split to a new topic: [Ionic Package: Execution failed for task ‘:processDebugManifest’](https://forum.ionicframework.com/t/ionic-package-execution-failed-for-task-processdebugmanifest/94270)
