Cannot serve with SQLJocky (Undefined class 'SHA1' & Other errors) - mysql

if I try to serve my dart application get these error:
Serving `web` on http://localhost:80 [INFO]
------------------------------------------------------------------------ [INFO] Starting Build [INFO] Updating asset graph completed, took 15ms [WARNING] build_web_compilers|entrypoint on web/main.dart: Unable to read sqljocky|lib/sqljocky.ddc.js, check your console or the `.dart_tool/build/generated/sqljocky/lib/sqljocky.ddc.js.errors` log file. [INFO] Running build completed, took 22.2s [INFO] Caching finalized dependency graph completed, took 622ms [SEVERE] build_web_compilers|ddc on package:sqljocky/sqljocky.module: Error compiling dartdevc module:sqljocky|lib/sqljocky.ddc.js
[error] Undefined class 'SHA1'. (package:sqljocky/src/auth/auth_handler.dart, line 24, col 24) [error] Undefined class 'SHA1'. (package:sqljocky/src/auth/auth_handler.dart, line 28, col 20) [error] Undefined class 'SHA1'. (package:sqljocky/src/auth/auth_handler.dart, line 32, col 20) [error] Invalid override. The type of 'ConnectionPool._removeConnection' ('(_Connection) → dynamic') isn't a subtype of '_ConnectionHelpers._removeConnection' ('(dynamic) → dynamic'). (package:sqljocky/src/connection_pool.dart, line 85, col 3) [error] Invalid override. The type of 'ConnectionPool._releaseConnection' ('(_Connection) → dynamic') isn't a subtype of '_ConnectionHelpers._releaseConnection' ('(dynamic) → dynamic'). (package:sqljocky/src/connection_pool.dart, line 89, col 3) [error] Invalid override. The type of 'ConnectionPool._reuseConnection' ('(_Connection) → dynamic') isn't a subtype of '_ConnectionHelpers._reuseConnection' ('(dynamic) → dynamic'). (package:sqljocky/src/connection_pool.dart, line 105, col 3) [error] Invalid override. The type of '_QuitHandler.processResponse' ('(Buffer) → dynamic') isn't a subtype of '_Handler.processResponse' ('(Buffer) → _HandlerResponse'). (package:sqljocky/src/handlers/quit_handler.dart, line 14, col 3) [error] Invalid override. The type of 'Query._releaseConnection' ('(_Connection) → dynamic') isn't a subtype of '_ConnectionHelpers._releaseConnection' ('(dynamic) → dynamic'). (package:sqljocky/src/query.dart, line 170, col 3) [error] Invalid override. The type of 'Query._reuseConnection' ('(_Connection) → dynamic') isn't a subtype of '_ConnectionHelpers._reuseConnection' ('(dynamic) → dynamic'). (package:sqljocky/src/query.dart, line 179, col 3) [error] Invalid override. The type of 'Query._removeConnection' ('(_Connection) → dynamic') isn't a subtype of '_ConnectionHelpers._removeConnection' ('(dynamic) → dynamic'). (package:sqljocky/src/query.dart, line 185, col 3) [error] Invalid override. The type of 'Transaction._releaseConnection' ('(_Connection) → dynamic') isn't a subtype of '_ConnectionHelpers._releaseConnection' ('(dynamic) → dynamic'). (package:sqljocky/src/transaction.dart, line 85, col 3) [error] Invalid override. The type of 'Transaction._reuseConnection' ('(_Connection) → dynamic') isn't a subtype of '_ConnectionHelpers._reuseConnection' ('(dynamic) → dynamic'). (package:sqljocky/src/transaction.dart, line 89, col 3) [error] Invalid override. The type of 'Transaction._removeConnection' ('(_Connection) → dynamic') isn't a subtype of '_ConnectionHelpers._removeConnection' ('(dynamic) → dynamic'). (package:sqljocky/src/transaction.dart, line 93, col 3)
Please fix all errors before compiling (warnings are okay). }
[SEVERE] Failed after 22.8s
I'm not using any function of SQLJocky, these are my imports:
import 'dart:async';
import 'dart:convert';
import 'package:angular/angular.dart';
import 'package:angular_components/angular_components.dart';
import 'package:sqljocky/sqljocky.dart';
import 'package:sqljocky/utils.dart';
import 'package:options_file/options_file.dart';
My pubspec.yaml:
name: MyDartPage
description: A web app that uses AngularDart Components
# version: 1.0.0
# homepage: https://www.example.com
# author: Mattia <email#example.com>
environment:
sdk: '>=2.0.0-dev.66.0 <2.0.0'
dependencies:
angular: any
angular_components: any
sqljocky: any
dev_dependencies:
angular_test: any
build_runner: any
build_test: any
build_web_compilers: any
test: any
before it looked like this:
name: MyDartPage
description: A web app that uses AngularDart Components
# version: 1.0.0
# homepage: https://www.example.com
# author: Mattia <email#example.com>
environment:
sdk: '>=2.0.0-dev.66.0 <2.0.0'
dependencies:
angular: ^5.0.0-beta
angular_components: ^0.9.0-beta
sqljocky: ^0.14.0
dev_dependencies:
angular_test: ^2.0.0-beta
build_runner: ^0.9.0
build_test: ^0.10.2
build_web_compilers: ^0.4.0
test: ^1.0.0
but I had to change it due this errors:
Because every version of build_runner depends on crypto >=0.9.2 <3.0.0
and crypto >=0.9.2 <2.0.1 depends on convert ^1.0.0, every version of
build_runner requires convert ^1.0.0 or crypto ^2.0.1. And because
build_runner >=0.6.1 depends on convert ^2.0.1 and sqljocky >=0.7.0
depends on crypto ^0.9.0, build_runner >=0.6.1 is incompatible with
sqljocky >=0.7.0. So, because MyDartPage depends on both sqljocky
^0.14.0 and build_runner ^0.9.0, version solving failed.
My dart version it's:
Dart VM version: 2.0.0-dev.67.0 (Tue Jul 3 18:17:07 2018 +0200) on
"windows_x64"
How can I fix both errors?

I solved using SQLJocky5 but on Dart 2 I had to make a PR to fix that:
https://github.com/dart-db/sqljocky5/pull/10

Related

File not found errors when trying to setup asciidoctor

I am trying to configure asciidoctor with Spring restdocs. I am upgrading it from org.asciidoctor.convert to org.asciidoctor.jvm.convert but am getting the error that it can't find the pages and load the snippets. And based on the errors I get it doesn't do anything with the configurations I set inside my gradle build file. I have tried to add asciidoctorExtensions in order to replace the deprecated asciidoctor but nothing seems to work.
The errors:
jun. 18, 2021 2:56:10 P.M. uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/substitutors.rb sub_macros
INFO: possible invalid reference: synchronization
jun. 18, 2021 2:56:10 P.M. uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb preprocess_include_directive
SEVERE: errors.adoc: line 23: include file not found: C:/Users/User/Documents/Projects/Trips/{snippets}/send not serializable date/response-body.adoc
include file not found: C:/Users/User/Documents/Projects/Trips/{snippets}/send not serializable date/response-body.adoc :: errors.adoc :: C:/Users/User/Documents/Projects/Trips/C:/Users/User/Documents/Projects/Trips/src/main/docs/errors.adoc:23 (uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb:preprocess_include_directive)
jun. 18, 2021 2:56:10 P.M. uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb preprocess_include_directive
SEVERE: index.adoc: line 51: include file not found: C:/Users/User/Documents/Projects/Trips/synchronization.adoc
include file not found: C:/Users/User/Documents/Projects/Trips/synchronization.adoc :: index.adoc :: C:/Users/User/Documents/Projects/Trips/C:/Users/User/Documents/Projects/Trips/src/main/docs/index.adoc:51 (uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb:preprocess_include_directive)
jun. 18, 2021 2:56:10 P.M. uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb preprocess_include_directive
SEVERE: index.adoc: line 67: include file not found: C:/Users/User/Documents/Projects/Trips/errors.adoc
include file not found: C:/Users/User/Documents/Projects/Trips/errors.adoc :: index.adoc :: C:/Users/User/Documents/Projects/Trips/C:/Users/User/Documents/Projects/Trips/src/main/docs/index.adoc:67 (uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb:preprocess_include_directive)
jun. 18, 2021 2:56:10 P.M. uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb preprocess_include_directive
SEVERE: index.adoc: line 78: include file not found: C:/Users/User/Documents/Projects/Trips/app-user-settings.adoc
include file not found: C:/Users/User/Documents/Projects/Trips/app-user-settings.adoc :: index.adoc :: C:/Users/User/Documents/Projects/Trips/C:/Users/User/Documents/Projects/Trips/src/main/docs/index.adoc:78 (uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb:preprocess_include_directive)
jun. 18, 2021 2:56:10 P.M. uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb preprocess_include_directive
SEVERE: index.adoc: line 82: include file not found: C:/Users/User/Documents/Projects/Trips/miscellaneous-calls.adoc
include file not found: C:/Users/User/Documents/Projects/Trips/miscellaneous-calls.adoc :: index.adoc :: C:/Users/User/Documents/Projects/Trips/C:/Users/User/Documents/Projects/Trips/src/main/docs/index.adoc:82 (uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb:preprocess_include_directive)
jun. 18, 2021 2:56:10 P.M. uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/converter/html5.rb convert_document
WARNING: C:/Users/User/Documents/Projects/Trips/src/main/docs/index.adoc: stylesheet does not exist or cannot be read: C:/Users/User/Documents/Projects/Trips/riak.css
jun. 18, 2021 2:56:10 P.M. uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/substitutors.rb sub_macros
C:/Users/User/Documents/Projects/Trips/src/main/docs/index.adoc: stylesheet does not exist or cannot be read: C:/Users/User/Documents/Projects/Trips/riak.css
Build.gradle:
plugins {
id("org.asciidoctor.jvm.convert") version "3.3.2"
...
kotlin("jvm") version "1.5.10"
kotlin("plugin.spring") version "1.5.10"
}
val asciidoctorExtensions: Configuration by configurations.creating
dependencies {
...
asciidoctorExtensions("org.springframework.restdocs:spring-restdocs-asciidoctor")
}
val snippetsDir by extra { file("build/generated-snippets") }
tasks.test {
useJUnitPlatform()
outputs.dir(snippetsDir)
mustRunAfter(tasks.flywayMigrate.get())
}
tasks.asciidoctor {
asciidoctorExtensions
sourceDir("src/main/docs")
inputs.dir(snippetsDir)
attributes["snippets"] = file(snippetsDir)
attributes["environment-${project.properties["spring.profiles.active"]}"] = true
dependsOn(tasks.test.get())
}
Index.adoc:
:toc: left
:sectlinks:
:sectnums:
:sectnumlevels: 5
:toc: left
:toclevels: 2
:page-layout: docs
:source-highlighter: highlightjs
:stylesheet: riak.css
...
include::errors.adoc[]
include::synchronization.adoc[]
include::app-user-settings.adoc[]
Errors.adoc:
[[errors, Errors]]
== Errors
...
[[not_serializable_date]]
==== Incorrect dateformat
include::{snippets}/send{sp}not{sp}serializable{sp}date/response-body.adoc[]
App-user-settings.adoc:
[[app_user_settings, AppUserSetting(s)]]
== AppUserSetting(s)
[.lead]
...
=== Create
...
[.tabs]
--
operation::create{sp}a{sp}app{sp}user{sp}setting[snippets='request-fields,request-body,curl-request,http-request,httpie-request']
--
What am I doing wrong / what do I have to change to have it work correctly?
You'll find a working example for Gradle here: https://github.com/spring-projects/spring-restdocs/blob/main/samples/rest-notes-spring-hateoas/build.gradle
Please note: There is no need to set the snippets attribute: It is set automatically by the spring-restdocs-asciidoctor extension.

Deep Learning, NLP, Valuenet: TypeError: string indices must be integers

I'm getting this error while trying to implement the project Valuenet https://github.com/brunnurs/valuenet on my laptop and I don't understand what exactly it means.
I'm getting this error after I try to train the Model using:- python src/main.py
Configuration:- Windows 10 home, Nvidia gtx 1650 with cuda enabled.
Output of wandb log file:-
** parsed configuration from command line and combine with constants **
argument: exp_name=exp
argument: seed=90
argument: toy=False
argument: data_set=spider
argument: batch_size=1
argument: cuda=False
argument: encoder_pretrained_model=bert-base-uncased
argument: max_seq_length=512
argument: num_epochs=5.0
argument: lr_base=0.001
argument: lr_connection=0.0001
argument: lr_transformer=2e-05
argument: scheduler_gamma=0.5
argument: max_grad_norm=1.0
argument: clip_grad=5.0
argument: loss_epoch_threshold=50
argument: sketch_loss_weight=1.0
argument: column_pointer=True
argument: embed_size=300
argument: hidden_size=300
argument: action_embed_size=128
argument: att_vec_size=300
argument: type_embed_size=128
argument: col_embed_size=300
argument: readout=identity
argument: column_att=affine
argument: dropout=0.3
argument: beam_size=5
argument: decode_max_time_step=40
argument: data_dir=data\spider
argument: model_output_dir=experiments
Run experiment 'exp__20210517_150422'
We use the device: 'cpu' and 0 gpu's.
Loading from datasets…
Load data from data\spider\original\tables.json. N=166
Load data from data\spider\train.json. N=7000
Load data from data\spider\dev.json. N=1032
Successfully loaded pre-trained transformer 'bert-base-uncased'
Use Column Pointer: True
Build optimizer and scheduler. Total training steps: 35000.0
Start training with 5.0 epochs
0%| | 0/5 [00:00<?, ?it/s]
Training: 0%| | 0/7000 [00:00<?, ?it/s]
Training: 0%| | 0/7000 [00:00<?, ?it/s]
0%| | 0/5 [00:00
sketch_loss_weight=sketch_loss_weight)
File "E:\Project\Implementation\valuenet1\valuenet\src\training.py", line 32, in train
sketch_loss, lf_loss = model.forward(examples)
File "E:\Project\Implementation\valuenet1\valuenet\src\model\model.py", line 117, in forward
batch.values)
File "D:\Python\Anaconda3\envs\valuenet\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\Project\Implementation\valuenet1\valuenet\src\model\encoder\encoder.py", line 65, in forward
averaged_hidden_states_question, pointers_after_question = self._average_hidden_states_question(last_hidden_states, all_question_span_lengths)
File "E:\Project\Implementation\valuenet1\valuenet\src\model\encoder\encoder.py", line 141, in _average_hidden_states_question
averaged_span = torch.mean(last_hidden_states[batch_itr_idx, pointer: pointer + span_length, :],
TypeError: string indices must be integers

In Chisel3, what imports do I need for the Printable examples?

I am trying to follow the example here:
https://github.com/freechipsproject/chisel3/wiki/Printing-in-Chisel#custom-printing
As in the example, I overrode def toPrintable: Printable with a concatenation of p"..." + strings.
In my scala file I
import chisel3._
But I get Scala compile warnings that it doesn't know what Printable is nor does it know what to do with the p interpolator, which makes me think I don't have the right imports.
Is there something I need to import other than chisel3._?
Here is a bit more information on what I am doing and what error I am getting.
I am modifying this file:
https://github.com/chipsalliance/rocket-chip/blob/e6a6c67f30d668e702ddbef93789e9b4f709b237/src/main/scala/tilelink/Bundles.scala
Here is what I have added:
...
import Chisel._
import chisel3.{Printable}
...
final class TLBundleA(params: TLBundleParameters)
extends TLBundleBase(params) with TLAddrChannel
{
...
override def toPrintable: Printable = {
p"A:\t" +
p"opcode[${opcode}]\t" +
p"param[${param}]\t" +
p"size[${size}]\t" +
p"source[${source}]\t" +
p"address[${address}]\t" +
p"user[${user}]\t" +
p"mask[${mask}]\t" +
p"data[${data}]\t" +
p"corrupt[${corrupt}]\n"
}
}
It seems that (unlike import chisel3._), import.chisel3.{Printable} works, but I am not doing something right with the p"...". I get this series of error:
[error] rocket-chip/src/main/scala/tilelink/Bundles.scala:189:5: value p is not a member of StringContext
[error] p"A:\t" +
[error] ^
[error] rocket-chip/src/main/scala/tilelink/Bundles.scala:190:5: value p is not a member of StringContext
[error] p"opcode[${opcode}]\t" +
[error] ^
...
[error] rocket-chip/src/main/scala/tilelink/Bundles.scala:198:5: value p is not a member of StringContext
[error] p"corrupt[${corrupt}]\n"
[error] ^
[error] 10 errors found
[error] (Compile / compileIncremental) Compilation failed
EDIT TO UPDATE:
After looking at the Chisel3 source, I added
import chisel3.{Printable, PrintableHelper}
and now I get a new error which looks more like I am just messing up my string:
[error] (run-main-0) java.lang.IllegalArgumentException: requirement failed
[error] java.lang.IllegalArgumentException: requirement failed
[error] at scala.Predef$.require(Predef.scala:268)
[error] at chisel3.printf$.escaped$1(Printf.scala:28)
[error] at chisel3.printf$.$anonfun$format$3(Printf.scala:32)
[error] ocketchiat chisel3.printf$.$anonfun$format$3$adapted(Printf.scala:32)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)
[error] at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)
[error] at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
[error] at scala.collection.immutable.StringOps.foreach(StringOps.scala:33)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:238)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:231)
[error] at scala.collection.immutable.StringOps.map(StringOps.scala:33)
[error] at chisel3.printf$.format(Printf.scala:32)
[error] at chisel3.internal.firrtl.Emitter.emit(Emitter.scala:75)
[error] at chisel3.internal.firrtl.Emitter.$anonfun$moduleDefn$4(Emitter.scala:140)
EDIT TO UPDATE:
I added more verbosity to the requires in the printf code and I think it doesn't like tabs (\t):
[error] (run-main-0) java.lang.IllegalArgumentException: requirement failed: char to Int 9 must be >= 32
[error] java.lang.IllegalArgumentException: requirement failed: char to Int 9 must be >= 32
EDIT TO UPDATE:
I modified chisel3 to be OK with tabs, and now the code compiles and runs, but this is one of the resulting verilog strings which is obviously not right. I tried the string2Printable import you suggested but still get the following:
freechips.rocketchip.system.DefaultConfig.v: $fwrite(32'h80000002,"PLIC_TL_IFC A:\tPrintables(ArrayBuffer(PString(opcode[), Decimal(UInt<3>(IO in unelaborated TLMonitor)), PString(]\t)))Printables(ArrayBuffer(PString(param[), Decimal(UInt<3>(IO in unelaborated TLMonitor)), PString(]\t)))Printables(ArrayBuffer(PString(size[), Decimal(UInt<2>(IO in unelaborated TLMonitor)), PString(]\t)))Printables(ArrayBuffer(PString(source[), Decimal(UInt<9>(IO in unelaborated TLMonitor)), PString(]\t)))Printables(ArrayBuffer(PString(address[), Decimal(UInt<28>(IO in unelaborated TLMonitor)), PString(]\t)))Printables(ArrayBuffer(PString(user[), PString(None), PString(]\t)))Printables(ArrayBuffer(PString(mask[), Decimal(UInt<8>(IO in unelaborated TLMonitor)), PString(]\t)))Printables(ArrayBuffer(PString(data[), Decimal(UInt<64>(IO in unelaborated TLMonitor)), PString(]\t)))Printables(ArrayBuffer(PString(corrupt[), Decimal(Bool(IO in unelaborated TLMonitor)), PString(]\n)))"); // #[Monitor.scala 577:40:freechips.rocketchip.system.DefaultConfig.fir#64082.10]
freechips.rocketchip.system.DefaultConfig.v: $fwrite(32'h80000002,"PLIC_TL_IFC TLBundleD(opcode -> %d, param -> %d, size -> %d, source -> %d, sink -> %d, denied -> %d, data -> %d, corrupt -> %d)",io_in_d_bits_opcode,2'h0,io_in_d_bits_size,io_in_d_bits_source,1'h0,1'h0,io_in_d_bits_data,1'h0); // #[Monitor.scala 578:40:freechips.rocketchip.system.DefaultConfig.fir#64090.10]
For reference, here is the callsite where I am actually calling this:
when (bundle.a.fire()) { printf(p"$prefix ${bundle.a.bits}")}
when (bundle.d.fire()) { printf(p"$prefix ${bundle.d.bits}")}
Note the bundle.d.bits looks "okay" because I haven't given it a specific toPrintable function, but bundle.a.bits is a mess.
EDIT: RESOLVED
The problem is I had changed my toPrintable in the course of debugging to be of the form
override def toPrintable: Printable = {
"A:\t" +
p"opcode[$opcode]\t" +
...
p"corrupt[$corrupt]\n"
}
}
The first un-p string was making the rest of them just be normal strings, ignoring the p. I put the first p"A:\t" back and now it interpolates correctly.
The import chisel3._ should be enough. Try looking at the examples in the Chisel3 repo such as LFSR16.scala. If that doesn't help can you show the error message.

Cannot find symbol import com.google.android.gms.maps.model.StreetViewSource?

I am working on an Ionic Project where i am getting below errors for google maps while building the app.
import com.google.android.gms.maps.model.StreetViewSource;
^
symbol: class StreetViewSource
location: package com.google.android.gms.maps.model
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:87: error: cannot find symbol
StreetViewSource source = "OUTDOOR".equals(cameraOpts.getString("source")) ?
^
symbol: class StreetViewSource
location: class PluginStreetViewPanorama
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:88: error: cannot find symbol
StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
^
symbol: variable StreetViewSource
location: class PluginStreetViewPanorama
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:88: error: cannot find symbol
StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
^
symbol: variable StreetViewSource
location: class PluginStreetViewPanorama
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:280: error: cannot find symbol
StreetViewSource source = "OUTDOOR".equals(cameraOpts.getString("source")) ?
^
symbol: class StreetViewSource
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:281: error: cannot find symbol
StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
^
symbol: variable StreetViewSource
I:\Team SlowCoach\OfferShare\platforms\android\src\plugin\google\maps\PluginStreetViewPanorama.java:281: error: cannot find symbol
StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
^
symbol: variable StreetViewSource
In package.json:
"cordova-plugin-googlemaps": "^2.4.6",
"#ionic-native/google-maps": "^4.9.1"
In project.properties:
target=android-26
android.library.reference.1=CordovaLib
cordova.system.library.1=com.facebook.android:facebook-android-sdk:4.+
cordova.system.library.2=com.google.android.gms:play-services-auth:11.+
cordova.system.library.3=com.google.android.gms:play-services-identity:11.+
cordova.gradle.include.1=twitter-connect-plugin/offershare-twitter.gradle
cordova.system.library.4=com.android.support:support-v4:24.1.1+
cordova.system.library.5=com.squareup.okhttp3:okhttp:3.+
cordova.gradle.include.2=cordova-plugin-googlemaps/offershare-tbxml-android.gradle
cordova.system.library.6=com.google.android.gms:play-services-maps:11.+
cordova.system.library.7=com.google.android.gms:play-services-location:11.+
cordova.system.library.8=com.android.support:support-core-utils:26.1.0
Which version of google maps should i use?

Gradle error with Android-studio and googleMap api

I created a simple project to test Google Api under android studio , but I have this error I tried to correct it by adding maps.jar to librairies of project structure no way :
Information:Compilation completed with 12 errors and 0 warnings in 17 sec
Information:12 errors
Information:0 warnings
/home/phenix-dz/AndroidStudioProjects/Geolocalisation/Geolocalisation/src/main/java/com/example/geolocalisation/MainActivity.java
Error:Error:line (4)Gradle: error: package com.google.android.maps does not exist
Error:Error:line (5)Gradle: error: package com.google.android.maps does not exist
Error:Error:line (6)Gradle: error: package com.google.android.maps does not exist
Error:Error:line (9)Gradle: error: cannot find symbol class MapActivity
Error:Error:line (11)Gradle: error: cannot find symbol class MapView
Error:Error:line (12)Gradle: error: cannot find symbol class MapController
Error:Error:line (16)Gradle: error: cannot find symbol variable super
Error:Error:line (17)Gradle: error: cannot find symbol method setContentView(int)
Error:Error:line (19)Gradle: error: cannot find symbol class MapView
Error:Error:line (19)Gradle: error: cannot find symbol method findViewById(int)
Error:Error:line (14)Gradle: error: method does not override or implement a method from a supertype
Error:Error:line (25)Gradle: error: method does not override or implement a method from a supertype
also I tried to add this code :
apply plugin: "java"
dependencies {
compile files('/home/phenix-dz/android-studio/sdk/add-ons/google_apis-671458-mac-x86/libs/maps.jar')
}
in build.gradle file but it gives me a same error.
Thanks