1

With a trivial QApplication in ~/hello I compile and deploy through

mkdir ~/hello_build
cd ~/hello_build
/Qt/5.7/android_armv7/bin/qmake -r -spec android-g++ ~/hello/hello.pro
make
make install INSTALL_ROOT=android

/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/keytool -genkey -v -keystore ~/hello/hello.keystore -alias hello-alias -keyalg RSA -keysize 2048 -validity 10000
/Qt/5.7/android_armv7/bin/androiddeployqt --output android --verbose --input android-libHello.so-deployment-settings.json --sign ~/hello/hello.keystore hello-alias --storepass MyPassword

At this point I see that AndroidManifest.xml has popped up in ~/hello_build/android, and so I replace

<manifest package="org.qtproject.example.Hello" 

with

<manifest package="com.mycorp.Hello"

and install

/android/platform-tools/adb install ~/hello_build/android/bin/QtApp-release-signed.apk

But now when I enter the android shell

/android/platform-tools/adb shell

and check the fully qualified package name, I see that it's still org.qtproject.example.Hello

$ pm list packages | grep hello
package:org.qtproject.example.Hello

Which string should I edit to set the fully qualified Qt/Android app name? Can this be done as early as in the .pro file?

Community
  • 1
  • 1
Calaf
  • 10,113
  • 15
  • 57
  • 120

1 Answers1

1

Changing package name in ~/hello_build/android/AndroidManifest.xml doesn't affect on your output file and actually you should set it before compiling. why don't you define it in ~/hello/android/AndroidManifest.xml file before any compile and deploy command? is there any certain reason that i've not got it?

Musa
  • 474
  • 4
  • 9
  • Umm.. because AndroidManifest.xml itself is a result of compiling. – Calaf Aug 02 '16 at 10:00
  • 1
    oh no. you should create it by "Create Templates" button in "Project" section and set your desired setting there before compiling. not bad to see [this](http://stackoverflow.com/questions/27590432/where-did-the-create-androidmanifest-xml-button-go-in-qt-creator-3-3-0) too. – Musa Aug 02 '16 at 11:10