LiquidCrystal I2C library not working on arduino zero

Hello!
I have a sketch useing the Liquid Crystal I2C library that doesn’t work on the arduino zero!
The sketch:

#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

// Serial2 pin and pad definitions (in Arduino files Variant.h & Variant.cpp)
#define PIN_SERIAL2_RX       (34ul)               // Pin description number for PIO_SERCOM on D12
#define PIN_SERIAL2_TX       (36ul)               // Pin description number for PIO_SERCOM on D10
#define PAD_SERIAL2_TX       (UART_TX_PAD_2)      // SERCOM pad 2
#define PAD_SERIAL2_RX       (SERCOM_RX_PAD_3)    // SERCOM pad 3
#define I2C_ADDR    0x3F // <<----- Add your address here.  Find it from I2C Scanner
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7

LiquidCrystal_I2C  lcd(I2C_ADDR, En_pin, Rw_pin, Rs_pin, D4_pin, D5_pin, D6_pin, D7_pin);


// Instantiate the Serial2 class
Uart Serial2(&sercom1, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX);

void setup()
{
  Serial2.begin(115200);          // Begin Serial2
  Serial.begin(115200);
  lcd.begin (16, 2); //  <<----- My LCD was 16x2


  // Switch on the backlight
  lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE);
  lcd.setBacklight(HIGH);
  lcd.home (); // go home
  lcd.setCursor(0,0);
  lcd.print("Temperatura:");
  lcd.setCursor(0,1);
  lcd.print("Umiditate:");
}

void loop()
{
  if (Serial2.available())        // Check if incoming data is available
  {

    
  }
  
}

void SERCOM1_Handler()    // Interrupt handler for SERCOM1
{
  Serial2.IrqHandler();
}

The code is too big so i will put it as a attachment!
Thanks

error.txt (43.4 KB)

what do you mean by "doesn't work"?

arduino_new: what do you mean by "doesn't work"?

I can't upload the code

Andreiva: I can't upload the code

So it compiles / verifies?

Please give the complete error.

I have the same problem with the MKRZero. It seems that this board doesn't recognize the LiquidCrystal_I2C library and the code can't compile. But the same code compile successfully on Arduino mega2560.

Code error:

In file included from C:\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:35:0:

C:\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp: In member function 'uint8_t LiquidCrystal_SR1W::clearSR()':

C:\Documents\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:77:24: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

And so on...

exit status 1
Error compiling for board Arduino MKRZERO.

What could be the solution? A dedicate library for these boards?