Android: fix for retrieving the path to deployment file and build dir

The Android deployment file for CMake project was constructed based
on the main project target and thus was always expecting the file
to be under the build folder root path. This makes sure the correct
path to the output path is retrieved.

This practically different problems with running examples when the
main project is a Qt module, for both qmake and cmake.

Fixes: QTCREATORBUG-25793
Change-Id: I5fdedd94c7c4c84c351c28476ca14b0f95f99f22
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2021-08-23 21:36:55 +03:00
parent dc71f32483
commit a2b6dba0bc
8 changed files with 77 additions and 32 deletions

View File

@@ -140,11 +140,16 @@ void AndroidDebugSupport::start()
if (qtVersion)
solibSearchPath.append(qtVersion->qtSoPaths());
solibSearchPath.append(uniquePaths(extraLibs));
solibSearchPath.append(runControl()->buildDirectory().toString());
const RunConfiguration *activeRunConfig = target->activeRunConfiguration();
FilePath buildDir;
if (activeRunConfig)
buildDir = activeRunConfig->buildTargetInfo().workingDirectory;
solibSearchPath.append(buildDir.toString());
solibSearchPath.removeDuplicates();
setSolibSearchPath(solibSearchPath);
qCDebug(androidDebugSupportLog) << "SoLibSearchPath: "<<solibSearchPath;
setSymbolFile(runControl()->buildDirectory().pathAppended("app_process"));
setSymbolFile(buildDir.pathAppended("app_process"));
setSkipExecutableValidation(true);
setUseExtendedRemote(true);
QString devicePreferredAbi = AndroidManager::apkDevicePreferredAbi(target);