@amin9 wrote:
ionic 3.20.0
Cannot find a complete code example of GoogleAnalytics implementation, Which can work on current version of ionic and typescript.tried (1): https://www.thepolyglotdeveloper.com/2016/03/use-google-analytics-in-an-ionic-2-android-and-ios-app/ (this one is outdated)
tried (2): https://stackoverflow.com/questions/38104609/error-implementing-google-analytics-into-ionic-2 (this one also looks outdated)
tried (3): https://github.com/danwilson/google-analytics-plugin returning error during build
Now build returning error.
Error Details:
D:\mypath1>ionic cordova build android --prod --release Running app-scripts build: --prod --platform android --target cordova [05:59:12] build prod started ... [05:59:12] clean started ... [05:59:12] clean finished in 2 ms [05:59:12] copy started ... [05:59:12] deeplinks started ... [05:59:12] deeplinks finished in 69 ms [05:59:12] ngc started ... Warning: Can't resolve all parameters for WebAudioTrack in D:/mypath1/node_mod ules/ionic-audio/dist/ionic-audio-web-track.d.ts: (?, ?). This will become an er ror in Angular v6.x Warning: Can't resolve all parameters for WebAudioTrack in D:/mypath1/node_mod ules/ionic-audio/dist/ionic-audio-web-track.d.ts: (?, ?). This will become an er ror in Angular v6.x Warning: Can't resolve all parameters for CordovaAudioTrack in D:/mypath1/node _modules/ionic-audio/dist/ionic-audio-cordova-track.d.ts: (?). This will become an error in Angular v6.x Warning: Can't resolve all parameters for CordovaAudioTrack in D:/mypath1/node _modules/ionic-audio/dist/ionic-audio-cordova-track.d.ts: (?). This will become an error in Angular v6.x [05:59:20] ngc finished in 7.66 s [05:59:20] preprocess started ... [05:59:20] preprocess finished in 1 ms [05:59:20] webpack started ... [05:59:20] copy finished in 7.92 s [06:00:47] webpack finished in 86.88 s [06:00:47] uglify started ... [06:00:47] sass started ... Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this w arning. [06:00:48] sass finished in 937 ms [06:00:48] cleancss started ... [06:00:49] cleancss finished in 1.45 s [06:01:00] uglify finished in 13.71 s [06:01:00] postprocess started ... [06:01:00] postprocess finished in 9 ms [06:01:00] lint started ... [06:01:00] build prod finished in 108.49 s > cordova build android --release Android Studio project detected ANDROID_HOME=C:\Users\Am\AppData\Local\Android\Sdk JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144 studio Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published. The Task.leftShift(Closure) method has been deprecated and is scheduled to be re moved in Gradle 5.0. Please use Task.doLast(Action) instead. at build_3y3zvrqrgo7sxddbenvng1nq5.run(D:\mypath1\platforms\android\ap p\build.gradle:144) Configuration 'compile' in project ':app' is deprecated. Use 'implementation' in stead. FAILURE: Build failed with an exception. * Where: Script 'D:\mypath1\platforms\android\cordova-support-google-services\qqq-bui ld.gradle' line: 16 * What went wrong: A problem occurred evaluating project ':app'. > Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugi n'] > For input string: "+" * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. * Get more help at https://help.gradle.org BUILD FAILED in 0s (node:10348) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with e xit code 1 Error output: FAILURE: Build failed with an exception. * Where: Script 'D:\mypath1\platforms\android\cordova-support-google-services\qqq-bui ld.gradle' line: 16 * What went wrong: A problem occurred evaluating project ':app'. > Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlu gin'] > For input string: "+" * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. * Get more help at https://help.gradle.org BUILD FAILED in 0s at ChildProcess.whenDone (D:\mypath1\platforms\android\cordova\node_module s\cordova-common\src\superspawn.js:169:23) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) (node:10348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejectio n id: 1) (node:10348) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr ecated. In the future, promise rejections that are not handled will terminate th e Node.js process with a non-zero exit code. [06:01:03] lint finished in 2.35 s D:\mypath1>Where can I find the exact version number for “com.android.tools.build:gradle”?
Posts: 1
Participants: 1