Google analytics + google maps issue

Hi,
do you have anybody experience with issue that if I have installed both this plugins, build app failed?

If I remove GA plugins, build succeed…

Chances are you’re missing the extra support libraries from the android sdk.

You can add them by running android from the command line, and then installing the correct packages.

image

I have all these installed and updated. You can look at my screen:

the whole error message if build failed is:

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: 14.498 secs

Error: /Applications/MAMP/htdocs/creox/apps/timetronic-app/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.
/Applications/MAMP/htdocs/creox/apps/timetronic-app/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 ‘: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.

can you post the full error in a gist or paste bin from

ionic build android -d

Here it is:

[12:38:05] lint finished in 3.37 s
[12:38:29] ngc finished in 27.86 s
[12:38:29] bundle started …
[12:38:39] bundle finished in 10.12 s
[12:38:39] uglifyjs started …
[12:38:39] sass started …
[12:38:42] sass finished in 2.50 s
[12:38:42] cleancss started …
[12:38:43] cleancss finished in 1.43 s
[12:38:59] uglifyjs finished in 19.55 s
[12:38:59] build prod finished in 57.54 s
No scripts found for hook “before_build”.

No scripts found for hook “before_prepare”.

Checking config.xml for saved platforms that haven’t been added to the project

Checking for any plugins added to the project that have not been installed in android platform

No differences found between plugins added to project and installed in android platform. Continuing…

Generating platform-specific config.xml from defaults for android at /Applications/MAMP/htdocs/creox/apps/timetronic-app/platforms/android/res/xml/config.xml

Merging project’s config.xml into platform-specific android config.xml

Merging and updating files from [www, platforms/android/platform_www] to platforms/android/assets/www

copy www/build/main.css platforms/android/assets/www/build/main.css (updated file)

copy www/build/main.js platforms/android/assets/www/build/main.js (updated file)

copy www/build/main.js.map platforms/android/assets/www/build/main.js.map (updated file)

copy www/build/polyfills.js platforms/android/assets/www/build/polyfills.js (updated file)

Wrote out android application name “Timetronic” to /Applications/MAMP/htdocs/creox/apps/timetronic-app/platforms/android/res/values/strings.xml

android-versionCode not found in config.xml. Generating a code based on version in config.xml (0.9.0): 900

Wrote out Android package name “cz.creox.timetronic” to /Applications/MAMP/htdocs/creox/apps/timetronic-app/platforms/android/src/cz/creox/timetronic/MainActivity.java

Updating icons at res

Updating splash screens at res

Prepared android project successfully

No scripts found for hook “after_prepare”.

Checking config.xml for saved plugins that haven’t been added to the project

No scripts found for hook “before_compile”.

ANDROID_HOME=/Users/mc/Library/Android/sdk

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home

Subproject Path: CordovaLib

Running command: /Applications/MAMP/htdocs/creox/apps/timetronic-app/platforms/android/gradlew cdvBuildDebug -b /Applications/MAMP/htdocs/creox/apps/timetronic-app/platforms/android/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true

Starting a new Gradle Daemon for this build (subsequent builds will be faster).

Incremental java compilation is an incubating feature.

:preBuild

UP-TO-DATE

:preDebugBuild

UP-TO-DATE

:checkDebugManifest

:CordovaLib:preBuild

UP-TO-DATE

:CordovaLib:preDebugBuild
UP-TO-DATE
:CordovaLib:checkDebugManifest

:CordovaLib:prepareDebugDependencies

:CordovaLib:compileDebugAidl

UP-TO-DATE

:CordovaLib:compileDebugNdk

UP-TO-DATE

:CordovaLib:compileLint
UP-TO-DATE
:CordovaLib:copyDebugLint
UP-TO-DATE

:CordovaLib:mergeDebugShaders
UP-TO-DATE

:CordovaLib:compileDebugShaders

UP-TO-DATE

:CordovaLib:generateDebugAssets
UP-TO-DATE

:CordovaLib:mergeDebugAssets

UP-TO-DATE

:CordovaLib:mergeDebugProguardFiles

UP-TO-DATE

:CordovaLib:packageDebugRenderscript

UP-TO-DATE

:CordovaLib:compileDebugRenderscript
UP-TO-DATE

:CordovaLib:generateDebugResValues
UP-TO-DATE

:CordovaLib:generateDebugResources

UP-TO-DATE

:CordovaLib:packageDebugResources
UP-TO-DATE

:CordovaLib:processDebugManifest

UP-TO-DATE

:CordovaLib:generateDebugBuildConfig
UP-TO-DATE
:CordovaLib:processDebugResources
UP-TO-DATE

:CordovaLib:generateDebugSources
UP-TO-DATE

:CordovaLib:incrementalDebugJavaCompilationSafeguard
UP-TO-DATE

:CordovaLib:compileDebugJavaWithJavac

UP-TO-DATE

:CordovaLib:processDebugJavaRes
UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForDebug
UP-TO-DATE

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug

UP-TO-DATE

:CordovaLib:mergeDebugJniLibFolders

UP-TO-DATE

:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
UP-TO-DATE

:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
UP-TO-DATE

:CordovaLib:bundleDebug

UP-TO-DATE

:prepareAndroidCordovaLibUnspecifiedDebugLibrary

UP-TO-DATE

:preReleaseBuild
UP-TO-DATE

:CordovaLib:preReleaseBuild

UP-TO-DATE

:CordovaLib:checkReleaseManifest

:CordovaLib:prepareReleaseDependencies

:CordovaLib:compileReleaseAidl

UP-TO-DATE

:CordovaLib:compileReleaseNdk

UP-TO-DATE

:CordovaLib:copyReleaseLint

UP-TO-DATE

:CordovaLib:mergeReleaseShaders
UP-TO-DATE

:CordovaLib:compileReleaseShaders

UP-TO-DATE

:CordovaLib:generateReleaseAssets

UP-TO-DATE

:CordovaLib:mergeReleaseAssets

UP-TO-DATE

:CordovaLib:mergeReleaseProguardFiles
UP-TO-DATE

:CordovaLib:packageReleaseRenderscript

UP-TO-DATE

:CordovaLib:compileReleaseRenderscript

UP-TO-DATE

:CordovaLib:generateReleaseResValues

UP-TO-DATE

:CordovaLib:generateReleaseResources
UP-TO-DATE

:CordovaLib:packageReleaseResources

UP-TO-DATE

:CordovaLib:processReleaseManifest
UP-TO-DATE

:CordovaLib:generateReleaseBuildConfig
UP-TO-DATE

:CordovaLib:processReleaseResources
UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
UP-TO-DATE

:CordovaLib:compileReleaseJavaWithJavac
UP-TO-DATE
:CordovaLib:processReleaseJavaRes
UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForRelease
UP-TO-DATE

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
UP-TO-DATE

:CordovaLib:mergeReleaseJniLibFolders
UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
UP-TO-DATE

:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
UP-TO-DATE

:CordovaLib:bundleRelease
UP-TO-DATE

:prepareComAndroidSupportSupportV42411Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesAnalytics1001Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1001Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesBase1001Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesBasement1001Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesLocation980Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesMaps980Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1001Library
UP-TO-DATE

:prepareComGoogleAndroidGmsPlayServicesTasks1001Library
UP-TO-DATE

:prepareDebugDependencies

:compileDebugAidl
UP-TO-DATE

:compileDebugRenderscript
UP-TO-DATE

:generateDebugBuildConfig
UP-TO-DATE

:generateDebugResValues
UP-TO-DATE

:generateDebugResources UP-TO-DATE

:mergeDebugResources
UP-TO-DATE

:processDebugManifest

UP-TO-DATE

:processDebugResources
UP-TO-DATE

:generateDebugSources
UP-TO-DATE

:incrementalDebugJavaCompilationSafeguard

UP-TO-DATE

:compileDebugJavaWithJavac

:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

/Applications/MAMP/htdocs/creox/apps/timetronic-app/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

: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: 19.726 secs

Command finished with error code 1: /Applications/MAMP/htdocs/creox/apps/timetronic-app/platforms/android/gradlew cdvBuildDebug,-b,/Applications/MAMP/htdocs/creox/apps/timetronic-app/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true

Error: /Applications/MAMP/htdocs/creox/apps/timetronic-app/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Applications/MAMP/htdocs/creox/apps/timetronic-app/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 ‘: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.
    at ChildProcess.whenDone (/Applications/MAMP/htdocs/creox/apps/timetronic-app/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:885:16)
    at Socket. (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)

I have the same problem. Google maps + Google analytics

On the new project, this bug again. Does anybody knows about this issue something?

Try going to platforms > android >project.properties and checkout

cordova.system.library.5=com.google.android.gms:play-services-location:9.8.0

Some plugin might set this library a second time with the + instead of the version causing a version mismatch

Ive had this with maps and background geoloaction plugin and ive had this with google analytics and the FCM plugin