génération du fichier .apk ionic et cordova
Bonjour,
je suis nouveau sur le développement des applications mobiles et j'ai eu un problème que j'ai cherché partout mais je n'arrive pas à résoudre.
En effet je veux faire une application mobile hybride avec ionic et cordova, quand je veux gégérer le fichier .apk en tapant la commande suivante:
Code:
ionic cordova build android
je reçois le message suivant:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| ionic-app-scripts build --target cordova --platform android
[03:42:19] ionic-app-scripts 3.1.11
[03:42:19] build dev started ...
[03:42:19] clean started ...
[03:42:19] clean finished in 33 ms
[03:42:19] copy started ...
[03:42:19] deeplinks started ...
[03:42:20] deeplinks finished in 61 ms
[03:42:20] transpile started ...
[03:42:32] transpile finished in 12.76 s
[03:42:32] preprocess started ...
[03:42:32] preprocess finished in 6 ms
[03:42:32] webpack started ...
[03:42:33] copy finished in 14.16 s
[03:42:52] webpack finished in 19.69 s
[03:42:52] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[03:42:56] sass finished in 3.65 s
[03:42:56] postprocess started ...
[03:42:56] postprocess finished in 72 ms
[03:42:56] lint started ...
[03:42:57] build dev finished in 37.67 s
[03:43:13] lint finished in 17.28 s
> cordova build android
Android Studio project detected
ANDROID_HOME=/opt/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
studio
(node:2611) UnhandledPromiseRejectionWarning: CordovaError: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
at Object.module.exports.check_gradle (/home/brahim/TestIonic/platforms/android/cordova/lib/check_reqs.js:150:18)
at StudioBuilder.prepEnv (/home/brahim/TestIonic/platforms/android/cordova/lib/builders/StudioBuilder.js:216:23)
at Api.module.exports.run (/home/brahim/TestIonic/platforms/android/cordova/lib/build.js:154:20)
at /home/brahim/TestIonic/platforms/android/cordova/Api.js:342:43
at _fulfilled (/home/brahim/TestIonic/platforms/android/cordova/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/home/brahim/TestIonic/platforms/android/cordova/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/home/brahim/TestIonic/platforms/android/cordova/node_modules/q/q.js:816:13)
at /home/brahim/TestIonic/platforms/android/cordova/node_modules/q/q.js:624:44
at runSingle (/home/brahim/TestIonic/platforms/android/cordova/node_modules/q/q.js:137:13)
at flush (/home/brahim/TestIonic/platforms/android/cordova/node_modules/q/q.js:125:13)
(node:2611) 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:2611) [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. |
NB: je suis sous ubuntu 16.04
Donc je ne comprends pas l'erreur donc j'ai besoin de votre aide pour pouvoir progresser.
Cordialement