"ABI is incompatible, device supports ABIs: ." with android sdk platform-tools v29.0.0
-
Hi all,
I recently upgraded my android SDK and it brings me v29.0.0 of platform-tools with no way to get back. In this version, I suppose that ADB comportment changed a bit when listing device supported ABIs. So when trying to deploy an android app to a connected device (USB or TCPIP), QtCreator 4.9.1 reports only incompatible devices with this explanation : "ABI is incompatible, device supports ABIs: ." (No supported ABI!)By exploring QtCreator source code, I found that adb seems to crash after listing supported ABI of my phone. (It's not really a crash, but a non-0 exit code...)
So I made a little ADB wrapper as a workaround and I post it here if it could help someone who encounters the same problem. You can use it by following these steps:
- Rename %AndroidSDK%\platform-tools\adb.exe as adb.exe.bak.exe
- Build a fake adb.exe using the following standard c++ code:
#include <cstdlib> #include <string> #include <iostream> #include <algorithm> #include <cctype> int main(int argc, char *argv[]) { std::string strCmd = std::string(argv[0]); std::string strExt = strCmd.substr(strCmd.length() - 4, 4); std::transform(strExt.begin(), strExt.end(), strExt.begin(), [](unsigned char c) { return std::tolower(c); }); if (strExt.compare(".exe") != 0) strCmd += ".exe"; strCmd += ".bak.exe"; if (argc > 1) { for (int i = 1; i < argc; ++i) { strCmd += " \"" + std::string(argv[i]) + "\""; } } std::system(strCmd.c_str()); }
- Put this new adb.exe in %AndroidSDK%\platform-tools\
I will try to propose a patch to QtCreator sources.
-
Thank you, having the same issue and your patch is working like a charm! Bravo!