URGENT ! 'You have not accepted the license agreements of the following SDK'


#1

I copied an ionic project from windows to Ubuntu 18.04 and i installed all the requirements ( Java, Gradle, Android SDK/Platforms…, Ionic, Cordova… )
i upgraded the android sdk and i accepted the license agreement but i still get this error when building and deploying

this is my packages.json

{
“name”: “Wydad”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
@angular/animations”: “5.2.9”,
@angular/common”: “5.2.9”,
@angular/compiler”: “5.2.9”,
@angular/compiler-cli”: “5.2.9”,
@angular/core”: “5.2.9”,
@angular/forms”: “5.2.9”,
@angular/http”: “5.2.9”,
@angular/platform-browser”: “5.2.9”,
@angular/platform-browser-dynamic”: “5.2.9”,
@ionic-native/admob-free”: “^4.7.0”,
@ionic-native/core”: “4.6.0”,
@ionic-native/facebook”: “^4.7.0”,
@ionic-native/google-plus”: “^4.7.0”,
@ionic-native/native-page-transitions”: “^4.6.0”,
@ionic-native/navigation-bar”: “^4.7.0”,
@ionic-native/screen-orientation”: “^4.7.0”,
@ionic-native/splash-screen”: “4.6.0”,
@ionic-native/status-bar”: “4.6.0”,
@ionic/storage”: “2.1.3”,
“cordova-admob-sdk”: “^0.15.1”,
“cordova-android”: “^7.1.0”,
“cordova-browser”: “5.0.3”,
“cordova-plugin-admob-free”: “^0.15.0”,
“cordova-plugin-device”: “^2.0.1”,
“cordova-plugin-facebook4”: “1.7.4”,
“cordova-plugin-ionic-keyboard”: “^2.0.5”,
“cordova-plugin-ionic-webview”: “^1.1.16”,
“cordova-plugin-screen-orientation”: “^3.0.1”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“cordova-promise-polyfill”: “0.0.2”,
“es6-promise-plugin”: “^4.2.2”,
“ionic-angular”: “3.9.2”,
“ionicons”: “3.0.0”,
“rxjs”: “5.5.8”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.20”
},
“devDependencies”: {
@ionic/app-scripts”: “3.1.8”,
“typescript”: “~2.6.2”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-whitelist”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-admob-free”: {},
“cordova-plugin-screen-orientation”: {},
“cordova-plugin-facebook4”: {
“APP_ID”: “404888656614706”,
“APP_NAME”: “Wydad”
}
},
“platforms”: [
“browser”
]
}
}

and this is the error

FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
  [Android Support Repository].

  Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
  Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 8.528 secs
(node:15365) UnhandledPromiseRejectionWarning: Error: /home/hamdanihamza/Documents/ionic/Wydad/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
  [Android Support Repository].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
  Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/home/hamdanihamza/Documents/ionic/Wydad/platforms/android/cordova/node_modules/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:15365) 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(). (rejection id:1)
(node:15365) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

#2

As longs as there is no plugin it work fine, but the minute i install any sort of plugin i get this error ! i need help please