The type of the target device does not match the deviceType configured in the config.json file of the selected module

496 views Asked by At

I'm trying to do development in HarmonyOS (DevEco, HAP, certificates, project structure, etc...). Right now, I'm stuck on trying to run a test application on a test device.

A few days ago I managed to get the Lite Wearable simulator running, but now it does not want to run anymore, when I launch the device manager and login with my Huawei developer account, all I get is "Unable to obtain the remote emulators: Network connection failure. Check the network connection or HTTP Proxy settings." However, I know there are no issues with my network and I'm not using any proxy.

Since the simulator is not working, I tried to plug my phone through USB and enable ADB, and I can see my phone listed in DevEco as a valid device for running code, however, when I try to run a test app I receive the error "The type of the target device does not match the deviceType configured in the config.json file of the selected module.", which does not make sense because I added all possible devices into the config.json file

enter image description here

Finally, I tried to create a HAP file so I can install the app on my Huawei Watch GT 3, but when I try to install the app with the DevEco assistant, I receive the error "Installation failed: Failed to decompress name_of_the_app"

I need help running a test app using any of these methods (Simulator or real device) before I spend anytime building the actual app.

1

There are 1 answers

0
Olivier López Ch On

I was just reading this article and found that the deviceType attribute could contain the value "liteWearable", which I've never heard of and was missing from my config.json.

I added this missing value and now I can successfully execute the simulator, which makes sense since it is a "Huawei Lite Wearable Simulator"