Ionic2 google maps Execution failed for task ':transformClassesWithDexForDebug' - google-maps

my project woks good without google maps plugin , when i install it and try to build i get:
* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define
Lcom/google/android/gms/iid/zzc;
when i create a new project and install the plugin it runs well so i think one of my plugins conflict with it
ionic info:
global packages:
#ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
local packages:
#ionic/app-scripts : 1.3.6
#ionic/cli-plugin-cordova : 1.4.0
#ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.1.1
System:
Node : v6.10.3
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 3.10.10
cordova plugin list:
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 1.10.4 "PushPlugin"
plugin.google.maps 1.3.9 "phonegap-googlemaps-plugin"
{}

Try installing version 1.3.9. Worked for me:
cordova plugin add cordova-plugin-googlemaps#1.3.9 --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"

Related

Catboost does not show plot when specifying plot=true in model.fit

https://i.stack.imgur.com/Z3WYl.png
https://i.stack.imgur.com/j3udw.png
Catboost doesnt show plot. I am using mac m1 arm. Jupyter is locally installed.
Selected Jupyter core packages...
IPython : 8.3.0
ipykernel : 6.13.0
ipywidgets : 7.7.0
jupyter_client : 7.3.0
jupyter_core : 4.10.0
jupyter_server : not installed
jupyterlab : not installed
nbclient : 0.6.2
nbconvert : 6.5.0
nbformat : 5.4.0
notebook : 6.4.11
qtconsole : not installed
traitlets : 5.1.1
Tried in safari and chrome. Tried everything i could. No idea what could be the reason.
coudnt solve it.
Installed anaconda and created env there. That did work.

Can't update to the latest version of cordova-ios

My app, built with Ionic and Cordova, includes the plugin GoogleMaps version 2.6.2 (the most recent), but it has not been loaded on iOS for a month, and Android still works.
I only have taken this product from a colleague and I am a total beginner in terms of Cordova, Ionic and npm. In any case the error is that the plugin is no longer installed (as my console tells me in xCode). When I try to update Cordova-ios to the latest version (ionic cordova platform update ios), I only get the error message
> cordova platform update ios
Using cordova-fetch for cordova-ios#^5.0.0
Failed to fetch platform cordova-ios#^5.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name / version / URL.
Error: npm: Command failed with exit code 1 Error output:
npm WARN # ionic-native / google-maps # 3.10.3 requires a peer of # ionic-native / core # ^ 3.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN # ngx-translate / core # 9.1.1 requires a peer of #angular / core #> = 5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package # types / node is included as both a dev and production dependency.
npm ERR! path /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim
npm ERR! code EEXIST
npm ERR! Refusing to delete /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim: is outside /path/to/app/node_modules / cordova-ios / node_modules / ios-sim and not a link
npm ERR! File exists: /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim
npm ERR! Move it away, and try again.
npm ERR! A complete log of this can be found in:
npm ERR! /path/to/app/.npm/_logs/2019-05-23T06_41_36_667Z-debug.log
[ERROR] An error occurred while running subprocess cordova.
        
        cordova update ios exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.
What does that mean exactly? I wanted to uninstall the iOS platform (ionic cordova platform remove ios) and add new ones (cordova platform add ios#5.0.0), but already when I uninstall I get the following error:
ionic cordova platform remove ios
> cordova platform remove ios --save
Removing ios from cordova.platforms array in package.json
Error: npm: Command failed with exit code 1 Error output:
npm WARN #ionic-native/google-maps#3.10.3 requires a peer of #ionic-native/core#^3.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN #ngx-translate/core#9.1.1 requires a peer of #angular/core#>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package #types/node is included as both a dev and production dependency.
npm ERR! path /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim
npm ERR! code EEXIST
npm ERR! Refusing to delete /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim: is outside /path/to/app/node_modules/cordova-ios/node_modules/ios-sim and not a link
npm ERR! File exists: /path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in:
npm ERR! /path/to/app/.npm/_logs/2019-05-23T07_05_52_055Z-debug.log
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/superspawn.js:125:23)
at ChildProcess.emit (events.js:196:13)
at maybeClose (internal/child_process.js:1011:16)
at Socket.<anonymous> (internal/child_process.js:416:11)
at Socket.emit (events.js:196:13)
at Pipe.<anonymous> (net.js:586:12) {
stderr: 'npm WARN #ionic-native/google-maps#3.10.3 requires a peer of ' +
'#ionic-native/core#^3.6.0 but none is installed. You must install peer ' +
'dependencies yourself.\nnpm WARN #ngx-translate/core#9.1.1 requires a ' +
'peer of #angular/core#>=5.0.0 but none is installed. You must install ' +
'peer dependencies yourself.\nnpm WARN The package #types/node is ' +
'included as both a dev and production dependency.\n\nnpm ERR! path ' +
'/path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim\n' +
'npm ERR! code EEXIST\nnpm ERR! Refusing to delete ' +
'/path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim: ' +
'is outside ' +
'/path/to/app/node_modules/cordova-ios/node_modules/ios-sim ' +
'and not a link\nnpm ERR! File exists: ' +
'/path/to/app/node_modules/cordova-ios/node_modules/.bin/ios-sim\n' +
'npm ERR! Move it away, and try again.\n\nnpm ERR! A complete log of this ' +
'run can be found in:\nnpm ERR! ' +
'/path/to/app/.npm/_logs/2019-05-23T07_05_52_055Z-debug.log\n',
code: 1
}
[ERROR] An error occurred while running subprocess cordova.
cordova platform remove ios --save exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I have installed the following plugins:
> cordova plugin ls
cordova-plugin-datepicker 0.9.3 "DatePicker"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.6.2 "cordova-plugin-googlemaps"
cordova-plugin-ionic-webview 4.0.1 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 2.6.0 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 1.11.1 "PushPlugin"
What exactly do I have to do to update cordova-ios to the latest version? What else do you need for information that I could give you? My Mac already has the latest operating system.
EDIT:
I ran rm -Rf platforms / node_modules / && npm install && ionic cordova platform add ios # latest and now I get the following output on the console.
> fsevents#1.2.9 install / path / to / app / node_modules / fsevents
> node install
node-pre-gyp WARN Using request for node-pre-gyp https download
[fsevents] Success: "/path/to/app/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" is installed via remote
> node-sass#4.12.0 install / path / to / app / node_modules / node-sat
> node scripts / install.js
Cached binary found at /path/to/app/.npm/node-sass/4.12.0/darwin-x64-72_binding.node
> uglifyjs-webpack-plugin#0.4.6 postinstall / path / to / app / node_modules / uglifyjs-webpack-plugin
> node lib / post_install.js
> node-sass#4.12.0 postinstall / path / to / app / node_modules / node-sass
> node scripts / build.js
Binary found at /path/to/app/node_modules/node-sass/vendor/darwin-x64-72/binding.node
Testing binary
Binary is fine
npm WARN The package # types / node is included as both a dev and production dependency.
added 1330 packages from 1442 contributors in 63.504s
> cordova platform add ios # latest --save
Using cordova-fetch for cordova-ios # latest
Adding ios project ...
Creating Cordova project for the iOS platform:
Path: platforms / ios
Package: com.gpsno
Name: GPS-No.com
iOS project created with cordova-ios#5.0.1
Installing "cordova-plugin-datepicker" for ios
Installing "cordova-plugin-device" for ios
Installing "cordova-plugin-geolocation" for ios
Installing "cordova-plugin-googlemaps" for ios
"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
cordova-plugin-googlemaps depends on GoogleMaps # ~> 2.7.0, which conflicts with another plugin. GoogleMaps # ~> 3.1.0 is already installed and was not overwritten.
Running command: pod install --verbose
      Official document https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.6.0/README.md Please consider buying beer for us 🍺 https://github.com/mapsplugin/ cordova-plugin-google maps # buy-us-a-beer
    
Installing "cordova-plugin-ionic-webview" for ios
Installing "cordova-plugin-splashscreen" for ios
Installing "cordova-plugin-statusbar" for ios
Installing "cordova-plugin-whitelist" for ios
Installing "cordova-sqlite-storage" for ios
Failed to install 'cordova-sqlite-storage': CordovaError: Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
    at Context.requireCordovaModule (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:57:15)
    at module.exports (/path/to/app/plugins/cordova-sqlite-storage/scripts/beforePluginInstall.js:13:21)
    at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:181:32)
    at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:16)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:125:20
    at processTicksAndRejections (internal / process / task_queues.js: 89: 5)
Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
[ERROR] An error occurred while running subprocess cordova.
        
        cordova platform add ios # latest --save exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.
It looks like everything had worked out. Do I have to worry about the message
cordova-plugin-googlemaps depends on GoogleMaps # ~> 2.7.0, which conflicts with another plugin. GoogleMaps # ~> 3.1.0 is already installed and was not overwritten.
If so what can I do or remove?
How can I solve the problem
Installing "cordova-sqlite-storage" for ios
Failed to install 'cordova-sqlite-storage': CordovaError: Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
Installing "cordova-sqlite-storage" for ios
Failed to install 'cordova-sqlite-storage': CordovaError: Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
This is because you have cordova#9.0.0 CLI installed which removed support for use of requireCordovaModule by 3rd party plugins, but you have an old version of cordova-sqlite-storage plugin installed which makes use of requireCordovaModule. So you need to update your version of cordova-sqlite-storage plugin:
cordova plugin rm cordova-sqlite-storage && cordova plugin add cordova-sqlite-storage#latest
cordova-plugin-googlemaps depends on GoogleMaps # ~> 2.7.0, which conflicts with another plugin. GoogleMaps # ~> 3.1.0 is already installed and was not overwritten.
Again probably due to an outdated version of cordova-plugin-googlemaps so update it:
cordova plugin rm cordova-plugin-googlemaps --nosave && cordova plugin add cordova-plugin-googlemaps#latest
Note the use of --nosave option when removing the plugin to preserve any plugin variables containing API keys.
You should also check and update the other plugins in your project. An easy way to do this is using the cordova-check-plugins tool:
npm install -g cordova-check-plugins
cordova-check-plugins --unconstrain-versions --update=auto
# or --update=interactive for interactive update process
Disclaimer: I am the author of cordova-check-plugins
Be aware when updating plugins that major version updates may contain breaking changes to APIs which your app makes use of, so you should be aware of this:
checkout the changelog or commit history of plugins for which you are updating the major version and make any necessary API changes in your app.

Trouble creating the quickstart application

I am working through the Digital Asset quickstart guide and I am unable to run:
da new quickstart-java quickstart
I get the following output:
getting-started Built-in template for version: 0.10.9-SDK
example-bond-trading Built-in template for version: 0.0.7
example-collateral Built-in template for version: 1.0.6
example-ping-pong-grpc-java Built-in template for version: 2.2.0
example-ping-pong-reactive-components-java Built-in template for version: 2.2.0
example-ping-pong-reactive-java Built-in template for version: 2.2.0
example-repo-market Built-in template for version: 0.0.5
example-upgrade Built-in template for version: 0.0.6
It seems "quickstart-java" is not an available template. Is there a way for me to install it?
I tried running it with 'getting-started' instead of 'quickstart-java' but it's not the same thing.
Can you confirm which version of the SDK you have? Do da list at a terminal prompt and look for the active and default version. From the output, it looks like you have version 0.10.9. You'll need to upgrade to 0.11.X - latest is 0.11.3
Here's the output on my terminal:
paul:da (master)$ da list
Installed SDK releases:
0.10.0
0.10.2
0.10.3
0.10.6
0.10.8
0.10.9
0.10.12
0.10.13
0.11.0
0.11.1
0.11.2
0.11.3 (active, default)
paul:da (master)$
You can use the command da use 0.11.3 once you have upgraded to set the default SDK version for new projects.

Cordova fails on a fresh Mojave installation

I installed a fresh Mojave to find this error with my build and I am not sure how to debug this, seems it's coming out of
cordova-plugin-googlemaps/PluginLocationService.m
cordova run ios --debug --verbose
The following build commands failed:
CompileC /Users/me/Library/Developer/Xcode/DerivedData/app-bdpokdmgnlhxvrfpkwhgoykdgckc/Build/Intermediates.noindex/app.build/Debug-iphonesimulator/app.build/Objects-normal/x86_64/PluginCircle.o app/Plugins/cordova-plugin-googlemaps/PluginCircle.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/me/Library/Developer/Xcode/DerivedData/app-bdpokdmgnlhxvrfpkwhgoykdgckc/Build/Intermediates.noindex/app.build/Debug-iphonesimulator/app.build/Objects-normal/x86_64/PluginLocationService.o app/Plugins/cordova-plugin-googlemaps/PluginLocationService.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
CordovaError: Promise rejected with non-error: 'Error code 65 for command: xcodebuild with args: -xcconfig,/Users/me/Documents/app/platforms/ios/cordova/build-debug.xcconfig,-workspace,app.xcworkspace,-scheme,app,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/me/Documents/app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/me/Documents/app/platforms/ios/build/sharedpch'
ionic info
Ionic:
ionic (Ionic CLI) : 4.10.3
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 9 other plugins)
System:
NodeJS : v11.10.0 (/Users/me/.nvm/versions/node/v11.10.0/bin/node)
npm : 6.7.0
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
Solution - install missing CocoaPods
cd platform/ios
pod install

Ionic Images not showing on first page load

im having an issue with images located on src/assets/images
Here's my ionic info output:
$ ionic info
cli packages: (C:\Users\Win 7\AppData\Roaming\npm\node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.11.1
npm : 5.6.0
OS : Windows 7
Environment Variables:
ANDROID_HOME : C:\Users\Win 7\AppData\Local\Android\Sdk
Misc:
backend : pro
When the page loads the first time images dont load, then i exit the page and re-enter to it again and the images are here x)
I used <ion-img src="..."></ion-img> tag
If you are directly passing the image path from assets as the source of , then use below code will fix the x sign issue:
<img src="assets/images/logo.png">
This is how you can insert image in your Ionic application.
<img src="assets/icon/myImage.png" class="image-responsive">