web-dev-qa-db-fra.com

com.Android.builder.testing.api.DeviceException: aucun appareil connecté

Scanning folders for symlinks in /home/sino/Desktop/we-clone/node_modules (4ms)
Starting JS server...
Building and installing the app on the device (cd Android && ./gradlew installDebug)...
Incremental Java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0493Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithDexForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:installDebug
07:52:34 E/adb: * daemon not running; starting now at tcp:5037
07:52:37 E/adb: * daemon started successfully
:app:installDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.Android.builder.testing.api.DeviceException: No connected devices!

* 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.916 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/Android-setup.html
7
kh deep

Si vous avez Android studio installé (sinon l'installer) lancez Android studio avec un projet factice, allez dans Outils -> AVD Manager . Assurez-vous de créer un périphérique virtuel et de le démarrer.

enter image description here

enter image description here

Remarque: pour créer cet appareil virtuel, vous devrez télécharger et installer un système d'exploitation compatible (compatible avec Android version SDK de votre projet - la version SDK se trouve à l'intérieur build.gradle file) avant le lancement. AVD Manager vous guidera dans le processus.

Une autre chose, vous utilisez peut-être un véritable Android pas un émulateur et recevez toujours ce message. Si votre appareil est connecté via USB à votre ordinateur portable, vous devez d'abord activer les options du développeur:

Si vous utilisez Android d'origine, accédez à Paramètres> À propos du téléphone> Numéro de version. Sur un appareil Samsung Galaxy, accédez à Paramètres> À propos de l'appareil> Numéro de version. Sur un appareil HTC, accédez à Paramètres> À propos> Informations sur le logiciel> Plus> Numéro de version. Sur un appareil LG, accédez à Paramètres> À propos du téléphone> Informations sur le logiciel> Numéro de build. Appuyez sept fois sur le numéro de build. options de développeur. Une fois activé, vous verrez un message qui dit: "Vous êtes maintenant un développeur!" Revenez à Paramètres, où vous trouverez une entrée Options de développeur dans le menu. ( https: // www .digitaltrends.com/mobile/comment-obtenir-les-options-de-développeur-sur-Android / )

Ensuite, dans les options de développement, vous devez activer le débogage USB .

enter image description here

10
SoftwareTheory

Vous devrez avoir un Android émulateur en cours d'exécution ou un périphérique physique connecté et en mode de débogage USB.

Voir https://facebook.github.io/react-native/docs/getting-started.html#preparing-the-Android-device pour plus d'informations.

9
Ian Mundy