Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66696

Building apks on Windows fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • 5.11.0 Beta 2
    • 5.11.0 Beta 1
    • QPA
    • None
    • Windows 10, ndk r10e, Nexus 7
    • Android

    Description

      Package fails to build in creator with error message: 

      Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
      java.lang.IllegalStateException: buildToolsVersion is not specified.
       at com.google.common.base.Preconditions.checkState(Preconditions.java:173)

       

      Looking at the information in "gradle.properties" the property androidBuildToolsVersion seems wrong (works fine if changed to a version available, e.g., "27.0.3"):

      androidBuildToolsVersion=android-5.1
      androidCompileSdkVersion=27
      buildDir=build
      qt5AndroidDir=D:/Qt/5.11.0/android_armv7/src/android/java

       

      Full build log:

       

      17:30:25: Running steps for project notification...
      17:30:25: Starting: "D:\Qt\5.11.0\android_armv7\bin\qmake.exe" D:\Qt\Examples\Qt-5.11.0\androidextras\notification\notification.pro -spec android-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
      Info: creating stash file D:\Qt\Examples\Qt-5.11.0\androidextras\notification\.qmake.stash
      17:30:25: The process "D:\Qt\5.11.0\android_armv7\bin\qmake.exe" exited normally.
      17:30:25: Starting: "D:\depot\projects\android\android-ndk-r10e\prebuilt\windows-x86_64\bin\make.exe" qmake_all
      make: Nothing to be done for `qmake_all'.
      17:30:26: The process "D:\depot\projects\android\android-ndk-r10e\prebuilt\windows-x86_64\bin\make.exe" exited normally.
      17:30:26: Starting: "D:\depot\projects\android\android-ndk-r10e\prebuilt\windows-x86_64\bin\make.exe" 
      D:\depot\projects\android\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -D__ANDROID_API__=16 --sysroot=D:\depot\projects\android\android-ndk-r10e/platforms/android-16/arch-arm/ -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_ANDROIDEXTRAS_LIB -DQT_CORE_LIB -I. -I..\..\..\..\5.11.0\android_armv7\include -I..\..\..\..\5.11.0\android_armv7\include\QtQuick -I..\..\..\..\5.11.0\android_armv7\include\QtGui -I..\..\..\..\5.11.0\android_armv7\include\QtQml -I..\..\..\..\5.11.0\android_armv7\include\QtNetwork -I..\..\..\..\5.11.0\android_armv7\include\QtAndroidExtras -I..\..\..\..\5.11.0\android_armv7\include\QtCore -I. -I..\..\..\..\5.11.0\android_armv7\mkspecs\android-g++ -o main.obj main.cpp
      D:\depot\projects\android\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -D__ANDROID_API__=16 --sysroot=D:\depot\projects\android\android-ndk-r10e/platforms/android-16/arch-arm/ -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_ANDROIDEXTRAS_LIB -DQT_CORE_LIB -I. -I..\..\..\..\5.11.0\android_armv7\include -I..\..\..\..\5.11.0\android_armv7\include\QtQuick -I..\..\..\..\5.11.0\android_armv7\include\QtGui -I..\..\..\..\5.11.0\android_armv7\include\QtQml -I..\..\..\..\5.11.0\android_armv7\include\QtNetwork -I..\..\..\..\5.11.0\android_armv7\include\QtAndroidExtras -I..\..\..\..\5.11.0\android_armv7\include\QtCore -I. -I..\..\..\..\5.11.0\android_armv7\mkspecs\android-g++ -o notificationclient.obj notificationclient.cpp
      D:\Qt\5.11.0\android_armv7\bin\rcc.exe -name main main.qrc -o qrc_main.cpp
      D:\depot\projects\android\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -D__ANDROID_API__=16 --sysroot=D:\depot\projects\android\android-ndk-r10e/platforms/android-16/arch-arm/ -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_ANDROIDEXTRAS_LIB -DQT_CORE_LIB -I. -I..\..\..\..\5.11.0\android_armv7\include -I..\..\..\..\5.11.0\android_armv7\include\QtQuick -I..\..\..\..\5.11.0\android_armv7\include\QtGui -I..\..\..\..\5.11.0\android_armv7\include\QtQml -I..\..\..\..\5.11.0\android_armv7\include\QtNetwork -I..\..\..\..\5.11.0\android_armv7\include\QtAndroidExtras -I..\..\..\..\5.11.0\android_armv7\include\QtCore -I. -I..\..\..\..\5.11.0\android_armv7\mkspecs\android-g++ -o qrc_main.obj qrc_main.cpp
      D:\depot\projects\android\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -D__ANDROID_API__=16 --sysroot=D:\depot\projects\android\android-ndk-r10e/platforms/android-16/arch-arm/ -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -std=gnu++11 -Wall -W -dM -E -o moc_predefs.h ..\..\..\..\5.11.0\android_armv7\mkspecs\features\data\dummy.cpp
      D:\Qt\5.11.0\android_armv7\bin\moc.exe -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_ANDROIDEXTRAS_LIB -DQT_CORE_LIB --include ./moc_predefs.h -ID:/Qt/5.11.0/android_armv7/mkspecs/android-g++ -ID:/Qt/Examples/Qt-5.11.0/androidextras/notification -ID:/Qt/5.11.0/android_armv7/include -ID:/Qt/5.11.0/android_armv7/include/QtQuick -ID:/Qt/5.11.0/android_armv7/include/QtGui -ID:/Qt/5.11.0/android_armv7/include/QtQml -ID:/Qt/5.11.0/android_armv7/include/QtNetwork -ID:/Qt/5.11.0/android_armv7/include/QtAndroidExtras -ID:/Qt/5.11.0/android_armv7/include/QtCore -ID:/depot/projects/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -ID:/depot/projects/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -Id:/depot/projects/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/include -Id:/depot/projects/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/include-fixed -ID:/depot/projects/android/android-ndk-r10e/platforms/android-16/arch-arm/usr/include notificationclient.h -o moc_notificationclient.cpp
      D:\depot\projects\android\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -D__ANDROID_API__=16 --sysroot=D:\depot\projects\android\android-ndk-r10e/platforms/android-16/arch-arm/ -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem D:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_ANDROIDEXTRAS_LIB -DQT_CORE_LIB -I. -I..\..\..\..\5.11.0\android_armv7\include -I..\..\..\..\5.11.0\android_armv7\include\QtQuick -I..\..\..\..\5.11.0\android_armv7\include\QtGui -I..\..\..\..\5.11.0\android_armv7\include\QtQml -I..\..\..\..\5.11.0\android_armv7\include\QtNetwork -I..\..\..\..\5.11.0\android_armv7\include\QtAndroidExtras -I..\..\..\..\5.11.0\android_armv7\include\QtCore -I. -I..\..\..\..\5.11.0\android_armv7\mkspecs\android-g++ -o moc_notificationclient.obj moc_notificationclient.cpp
      D:\depot\projects\android\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ --sysroot=D:\depot\projects\android\android-ndk-r10e/platforms/android-16/arch-arm/ -Wl,-soname,libnotification.so -Wl,-rpath=D:/Qt/5.11.0/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libnotification.so main.obj notificationclient.obj qrc_main.obj moc_notificationclient.obj -LD:\depot\projects\android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -Ld:/depot/projects/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9 -LD:/Qt/5.11.0/android_armv7/lib -lQt5Quick -Lc:\utils\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -Lc:/utils/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.9 -LD:\Qt\5.11.0\android_armv7/lib -lQt5Gui -lQt5Qml -lQt5Network -lQt5AndroidExtras -lQt5Core -lGLESv2 -lgnustl_shared -lgcc -llog -lz -lm -ldl -lc
      17:30:30: The process "D:\depot\projects\android\android-ndk-r10e\prebuilt\windows-x86_64\bin\make.exe" exited normally.
      17:30:30: Starting: "D:\depot\projects\android\android-ndk-r10e\prebuilt\windows-x86_64\bin\make.exe" "INSTALL_ROOT=D:\Qt\Examples\Qt-5.11.0\androidextras\notification\android-build" install
      D:\Qt\5.11.0\android_armv7\bin\qmake.exe -install qinstall -exe libnotification.so D:\Qt\Examples\Qt-5.11.0\androidextras\notification\android-build\libs\armeabi-v7a\libnotification.so
      17:30:30: The process "D:\depot\projects\android\android-ndk-r10e\prebuilt\windows-x86_64\bin\make.exe" exited normally.
      17:30:30: Starting: "D:\Qt\5.11.0\android_armv7\bin\androiddeployqt.exe" --input D:/Qt/Examples/Qt-5.11.0/androidextras/notification/android-libnotification.so-deployment-settings.json --output D:/Qt/Examples/Qt-5.11.0/androidextras/notification/android-build --android-platform android-27 --jdk "C:/Program Files/Java/jdk1.8.0_60" --gradle
      Generating Android Package
       Input file: D:/Qt/Examples/Qt-5.11.0/androidextras/notification/android-libnotification.so-deployment-settings.json
       Output directory: D:/Qt/Examples/Qt-5.11.0/androidextras/notification/android-build/
       Application binary: D:/Qt/Examples/Qt-5.11.0/androidextras/notification/libnotification.so
       Android build platform: android-27
       Install to device: No
      Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
      java.lang.IllegalStateException: buildToolsVersion is not specified.
       at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
       at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:645)
       at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:608)
       at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:605)
       at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
       at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
       at com.android.build.gradle.BasePlugin.lambda$createTasks$1(BasePlugin.java:603)
       at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:93)
       at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:82)
       at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
       at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
       at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
       at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
       at com.sun.proxy.$Proxy15.afterEvaluate(Unknown Source)
       at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:82)
       at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:76)
       at org.gradle.configuration.project.LifecycleProjectEvaluator.access$000(LifecycleProjectEvaluator.java:33)
       at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:53)
       at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:50)
       at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
       at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)
       at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:599)
       at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:125)
       at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
       at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:60)
       at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
       at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuildAction.execute(DefaultGradleLauncher.java:233)
       at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuildAction.execute(DefaultGradleLauncher.java:230)
       at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
       at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:160)
       at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
       at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
       at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
       at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
       at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
       at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
       at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
       at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
       at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
       at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:49)
       at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:31)
       at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
       at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
       at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:244)
       at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:217)
       at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:33)
       at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
       at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
       at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
       at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:210)
       at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:174)
       at org.gradle.launcher.Main.doAction(Main.java:33)
       at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:497)
       at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
       at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
       at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:497)
       at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31)
       at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
       at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
      FAILURE: Build failed with an exception.
      * Where:
      Build file 'D:\Qt\Examples\Qt-5.11.0\androidextras\notification\android-build\build.gradle' line: 39
      * What went wrong:
      A problem occurred evaluating root project 'android-build'.
      > Invalid revision: android-5.1
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      BUILD FAILED
      Total time: 2.472 secs
      Building the android package failed!
       -- For more information, run this command with --verbose.
      17:30:35: The process "D:\Qt\5.11.0\android_armv7\bin\androiddeployqt.exe" exited with code 14.
      Error while building/deploying project notification (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.11.0 for Android armv7))
      When executing step "Build Android APK"
      17:30:35: Elapsed time: 00:10.
      

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            stromme Christian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes