Steps to reproduce
PROBLEM ROOT:
./testproject/android/build.xml contains non-configured/hardcoded project attribute which makes installation to fail via Creator Run
-> Apk generated by build.xml is QtActivity_debug.apk and Creator thinks that there should be testproject_debug.apk ready for adb install
-> File seems to be always re-generated when Qt project is updated which makes build.xml changing impossible
WORKAROUND: To be able to use Qt Creator's Run feature, you must rename your app to QtAcitivity by
Projects -> Android (Run) -> Application -> Application name: QtActivity
Santeri Vesalainen
2011-02-23
Hogni Gylfason
2011-02-25
An alternative workaround is to create a custom process step in QT Creator under run settings that renames/copies QtActivity-debug.apk to match the name of the application. Somewhat cumbersome, but after it's configured it's less painful.
Command: cp
Working directory: <projectpath>/android/bin
Command arguments: -f QtActivity-debug.apk projectname<-debug>.apk
I don't know the quick macros in QT that define the custom project paths of android Qt {buildDir} doesn't work.
Villy Thomsen
2011-02-26
A little additional information.
build.xml is updated with the "QtActivity" as project name when qtcreator runs (in my case):
android-sdk-linux_x86/tools/android update project -p /home/villyft/src/Tester/android -t android-8
Which is done from:
android-qt-creator/src/plugins/qt4projectmanager/qt-android/qt4androidtarget.cpp
in the updateProject() function
If I goto the AndroidManifest.xml for my "Tester" project and change the "QtActivity" in
<activity android:name="eu.licentia.necessitas.industrius.QtActivity" android:label="@string/app_name">
To "Tester" then build.xml will contain the correct name "Tester" after update. But the application crashes more or less immediately when deployed onto an AVD.
I'm on Ubuntu 10.10. Android NDK R5b, android SDK r10. And my target is an Android 2.2 AVD.
Villy Thomsen
2011-02-26
Attachment with a project that has the problem
BogDan Vatra
2011-02-26
Yah, I can reproduce this issue, I'll fix it soon.
Thank you.
BogDan Vatra
2011-02-26
Villy Thomsen
2011-02-26
Jep - that fixes it nicely. Thanx!
BogDan Vatra
2011-02-27
New SDK released containing the fix. http://groups.google.com/group/android-qt/t/7a49359d76bd8a74