MPU6050 errors: 'class MPU6050' has no member named 'begin'

I am trying to replicate a earthquake monitering project from the link:  Earthquake Detector using Arduino and MPU-6050

I have already prepared the physcal setup of the project but am having a lot of trouble with the code. I don't know how to fix the problem with the library. I have tried it on my desktop as well as web editor, with the same results. Is there something wrong with the library itself or is it the code? I read somewhere that MPU6050 library had keys for both the 6-axis gyroscope and 9-axis gyrosocpe (this project involves 6-axis). I do not know how i can fix this problem. I have put the error and the code below:

FULL ERROR IN THE REPLIES

PICTURES OF THE FILES AND KEYWORDS:

CODE:

#include <LiquidCrystal.h>

#include <Wire.h>

#include <MPU6050.h>

#define minval -5

#define maxval 3

MPU6050 mpu;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()

{   lcd.begin(16, 2);

    Serial.begin(115200);

    pinMode(7,OUTPUT);

    pinMode(8,OUTPUT);

    lcd.print("   EarthQuake ");

    lcd.setCursor(0, 1);

    lcd.print("   Detector");

    delay (2000);

    lcd.clear();

  // Initialize MPU6050

  Serial.println("Initialize MPU6050");

  while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

  { Serial.println("Could not find a valid MPU6050 sensor, check wiring!");

    delay(500);}

  mpu.setThreshold(3); 

  // Check settings

  checkSettings();

}



void checkSettings()

{

  Serial.println();



  Serial.print(" * Sleep Mode:        ");

  Serial.println(mpu.getSleepEnabled() ? "Enabled" : "Disabled");

  Serial.print(" * Clock Source:      ");

  switch(mpu.getClockSource())

  {case MPU6050_CLOCK_KEEP_RESET:     Serial.println("Stops the clock and keeps the timing generator in reset"); break;

    case MPU6050_CLOCK_EXTERNAL_19MHZ: Serial.println("PLL with external 19.2MHz reference"); break;

    case MPU6050_CLOCK_EXTERNAL_32KHZ: Serial.println("PLL with external 32.768kHz reference"); break;

    case MPU6050_CLOCK_PLL_ZGYRO:      Serial.println("PLL with Z axis gyroscope reference"); break;

    case MPU6050_CLOCK_PLL_YGYRO:      Serial.println("PLL with Y axis gyroscope reference"); break;

    case MPU6050_CLOCK_PLL_XGYRO:      Serial.println("PLL with X axis gyroscope reference"); break;

    case MPU6050_CLOCK_INTERNAL_8MHZ:  Serial.println("Internal 8MHz oscillator"); break;

  }

  Serial.print(" * Gyroscope:         ");

  switch(mpu.getScale))

  {case MPU6050_SCALE_2000DPS:        Serial.println("2000 dps"); break;

    case MPU6050_SCALE_1000DPS:        Serial.println("1000 dps"); break;

    case MPU6050_SCALE_500DPS:         Serial.println("500 dps"); break;

    case MPU6050_SCALE_250DPS:         Serial.println("250 dps"); break:}

  Serial.print(" * Gyroscope offsets: ");

  Serial.print(mpu.getGyroOffsetX());

  Serial.print(" / ");

  Serial.print(mpu.getGyroOffsetY());

  Serial.print(" / ");

  Serial.println(mpu.getGyroOffsetZ());

  Serial.println();}

void loop()

{   Vector rawGyro = mpu.readRawGyro();

  Vector normGyro = mpu.readNormalizeGyro();

  Serial.print(" Xraw = ");

  Serial.print(rawGyro.XAxis);

  Serial.print(" Yraw = ");

  Serial.print(rawGyro.YAxis);

  Serial.print(" Zraw = ");

  Serial.println(rawGyro.ZAxis); 

if(normGyro.XAxis > maxval || normGyro.XAxis < minval && normGyro.YAxis > maxval || normGyro.YAxis  < minval && normGyro.ZAxis > maxval || normGyro.ZAxis  < minval)

{ digitalWrite(7,HIGH);

  digitalWrite(8,HIGH);

  delay(300);

  digitalWrite(7,HIGH);

  digitalWrite(8,HIGH);

  delay(300);

  lcd.clear();

  lcd.print("***EarthQuake***");

  delay (1000);

  lcd.clear();}

 else{digitalWrite(7,LOW);

 digitalWrite(8,LOW);}

  Serial.print(" Xnorm = ");

  Serial.print(normGyro.XAxis);

  Serial.print(" Ynorm = ");

  Serial.print(normGyro.YAxis);

  Serial.print(" Znorm = ");

  Serial.println(normGyro.ZAxis);

  delay(10);}

Please read the "How to use this forum" post, and edit your post to add code tags.

You have too many MPU-6050 libraries. Get rid of the extra ones, and make sure that you understand how the remaining library is to be used.

You don't need any library to capture acceleration data, if that is all you want.

You will often find that there are multiple libraries which contain a generic header filename like "MPU6050.h". You need to use the specific version of the library the code was written for. In a perfect world, the author of the code would have taken a few seconds to document where you can find this library. Unfortunately, in this case the author of the code was not so kind. So you will either need to go on a scavenger hunt to find that specific library, or else rewrite the code to work with the library you are using.

I was unable to identify which were the unnecessary file duplicates and hit and trial with multiple of them did not succeed. The link of picture of list of files present and the keywords.txt is: #1List of files in 'MPU6050' in library #2Keywords.txt - Album on Imgur
The full error message is:
Arduino: 1.8.10 (Mac OS X), Board: "Arduino/Genuino Uno"

/Users/dev/Documents/Arduino/earthquake/earthquake.ino: In function 'void setup()':
earthquake:39:14: error: 'class MPU6050' has no member named 'begin'
while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
^~~~~
earthquake:39:20: error: 'MPU6050_SCALE_2000DPS' was not declared in this scope
while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
^~~~~~~~~~~~~~~~~~~~~
/Users/dev/Documents/Arduino/earthquake/earthquake.ino:39:20: note: suggested alternative: 'MPU6050_RA_FF_DUR'
while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
^~~~~~~~~~~~~~~~~~~~~
MPU6050_RA_FF_DUR
earthquake:39:43: error: 'MPU6050_RANGE_2G' was not declared in this scope
while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
^~~~~~~~~~~~~~~~
/Users/dev/Documents/Arduino/earthquake/earthquake.ino:39:43: note: suggested alternative: 'MPU6050_RA_FF_DUR'
while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
^~~~~~~~~~~~~~~~
MPU6050_RA_FF_DUR
earthquake:45:7: error: 'class MPU6050' has no member named 'setThreshold'
mpu.setThreshold(3);
^~~~~~~~~~~~
/Users/dev/Documents/Arduino/earthquake/earthquake.ino: In function 'void checkSettings()':
earthquake:73:10: error: 'MPU6050_CLOCK_EXTERNAL_19MHZ' was not declared in this scope
case MPU6050_CLOCK_EXTERNAL_19MHZ: Serial.println("PLL with external 19.2MHz reference"); break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev/Documents/Arduino/earthquake/earthquake.ino:73:10: note: suggested alternative: 'MPU6050_CLOCK_INTERNAL'
case MPU6050_CLOCK_EXTERNAL_19MHZ: Serial.println("PLL with external 19.2MHz reference"); break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
MPU6050_CLOCK_INTERNAL
earthquake:75:10: error: 'MPU6050_CLOCK_EXTERNAL_32KHZ' was not declared in this scope
case MPU6050_CLOCK_EXTERNAL_32KHZ: Serial.println("PLL with external 32.768kHz reference"); break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev/Documents/Arduino/earthquake/earthquake.ino:75:10: note: suggested alternative: 'MPU6050_CLOCK_INTERNAL'
case MPU6050_CLOCK_EXTERNAL_32KHZ: Serial.println("PLL with external 32.768kHz reference"); break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
MPU6050_CLOCK_INTERNAL
earthquake:83:10: error: 'MPU6050_CLOCK_INTERNAL_8MHZ' was not declared in this scope
case MPU6050_CLOCK_INTERNAL_8MHZ: Serial.println("Internal 8MHz oscillator"); break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev/Documents/Arduino/earthquake/earthquake.ino:83:10: note: suggested alternative: 'MPU6050_CLOCK_INTERNAL'
case MPU6050_CLOCK_INTERNAL_8MHZ: Serial.println("Internal 8MHz oscillator"); break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
MPU6050_CLOCK_INTERNAL
earthquake:89:14: error: 'class MPU6050' has no member named 'getScale'; did you mean 'getRate'?
switch(mpu.getScale))
^~~~~~~~
getRate
earthquake:89:23: error: expected primary-expression before ')' token
switch(mpu.getScale))
^
earthquake:101:20: error: 'class MPU6050' has no member named 'getGyroOffsetX'; did you mean 'getXGyroOffset'?
Serial.print(mpu.getGyroOffsetX());
^~~~~~~~~~~~~~
getXGyroOffset
earthquake:105:20: error: 'class MPU6050' has no member named 'getGyroOffsetY'; did you mean 'getXGyroOffset'?
Serial.print(mpu.getGyroOffsetY());
^~~~~~~~~~~~~~
getXGyroOffset
earthquake:109:22: error: 'class MPU6050' has no member named 'getGyroOffsetZ'; did you mean 'getXGyroOffset'?
Serial.println(mpu.getGyroOffsetZ());
^~~~~~~~~~~~~~
getXGyroOffset
/Users/dev/Documents/Arduino/earthquake/earthquake.ino: In function 'void loop()':
earthquake:115:5: error: 'Vector' was not declared in this scope
{ Vector rawGyro = mpu.readRawGyro();
^~~~~~
/Users/dev/Documents/Arduino/earthquake/earthquake.ino:115:5: note: suggested alternative: 'perror'
{ Vector rawGyro = mpu.readRawGyro();
^~~~~~
perror
earthquake:117:10: error: expected ';' before 'normGyro'
Vector normGyro = mpu.readNormalizeGyro();
^~~~~~~~
earthquake:121:16: error: 'rawGyro' was not declared in this scope
Serial.print(rawGyro.XAxis);
^~~~~~~
earthquake:131:4: error: 'normGyro' was not declared in this scope
if(normGyro.XAxis > maxval || normGyro.XAxis < minval && normGyro.YAxis > maxval || normGyro.YAxis < minval && normGyro.ZAxis > maxval || normGyro.ZAxis < minval)
^~~~~~~~
earthquake:159:16: error: 'normGyro' was not declared in this scope
Serial.print(normGyro.XAxis);
^~~~~~~~
Multiple libraries were found for "LiquidCrystal.h"
Used: /Applications/Arduino.app/Contents/Java/libraries/LiquidCrystal
Multiple libraries were found for "Wire.h"
Used: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire
Multiple libraries were found for "MPU6050.h"
Used: /Users/dev/Documents/Arduino/libraries/MPU6050
exit status 1
'class MPU6050' has no member named 'begin'

Check the box next to "Show verbose output during: compilation" in File > Preferences and compile again. That should cause it to show you the location of the other MPU6050 library that is not being used.

I looked for it in the complete verbose error message but could not find it. It only had this message:

Multiple libraries were found for "LiquidCrystal.h"
Used: /Applications/Arduino.app/Contents/Java/libraries/LiquidCrystal
Multiple libraries were found for "Wire.h"
Used: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire
Multiple libraries were found for "MPU6050.h"
Used: /Users/dev/Documents/Arduino/libraries/MPU6050
Using library LiquidCrystal at version 1.0.7 in folder: /Applications/Arduino.app/Contents/Java/libraries/LiquidCrystal
Using library Wire at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire
Using library MPU6050 at version 0.0.2 in folder: /Users/dev/Documents/Arduino/libraries/MPU6050
exit status 1
'class MPU6050' has no member named 'begin'

I suspected that i had it in both the Java/libraries and the Documents/Libraries, but that was not the case after i cheacked for it.

I tried the same in the web editor and it had this message:
Multiple libraries were found for "MPU6050.h"

Used: /tmp/899662345/pinned/mpu6050_0_0_2

Not used: /home/builder/opt/libraries/latest/mpu6050_0_0_2

Not used: /home/builder/opt/libraries/latest/grove_imu_9dof_1_0_0

But in this case, i do not know where i can find these files and ammend them. Where do i input the location address to find the files and remove them?