Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

"androiddeployqt.exe" exited with code 4



  • Greetings. I just updated to qt 5.11.2, but I have problems compiling an Android application. I have SDK 26.1.1, NDK 10.4.0 (r10e) and JDK 1.9.0 and I still get the error:

    qmlimportscanner: No such file or directory: "D:/DROP"
    Invalid json output from qmlimportscanner.
    14:34:21: The process "C:\Qt\Qt5.11.2\5.11.2\android_armv7\bin\androiddeployqt.exe" exited with code 4.
    Error while building/deploying project RegCharge2 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.11.2 for Android ARMv7))
    When executing step "Build Android APK"
    

    I do not quite understand what happens. Does anyone have an idea?


  • Moderators

    @Blaster
    stupid question: does D:/DROP exist?
    Where are you using DROP in your project?



  • @raven-worx D:/DROP is part of the complete path to the project that is D:/DROP BOX/Qt Projects. Do I have to put it without space? I guess not because in previous versions of qt that was the same directory that used


  • Moderators

    @Blaster said in "androiddeployqt.exe" exited with code 4:

    Do I have to put it without space?

    this is always a good advice.

    It's not all about Qt itself, but also about QtCreator which executes the commands. So there might have been some changes too.
    But anyway, when developing for Android you should always keep the path as short as possible and clean from spaces.



  • @raven-worx OK, I will delete the spaces.



  • @raven-worx Well, friend, now there is another problem.

    Exception in thread "main" java.net.UnknownHostException: services.gradle.org
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
    	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    	at java.net.Socket.connect(Socket.java:591)
    	at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:649)
    	at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:174)
    	at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    	at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    	at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    	at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
    	at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
    	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1103)
    	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:997)
    	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1511)
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
    	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    	at org.gradle.wrapper.Download.downloadInternal(Download.java:60)
    	at org.gradle.wrapper.Download.download(Download.java:45)
    	at org.gradle.wrapper.Install$1.call(Install.java:62)
    	at org.gradle.wrapper.Install$1.call(Install.java:48)
    	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
    	at org.gradle.wrapper.Install.createDist(Install.java:48)
    	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
    	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Building the android package failed!
      -- For more information, run this command with --verbose.
    08:17:26: The process "C:\Qt\Qt5.11.2\5.11.2\android_armv7\bin\androiddeployqt.exe" exited with code 14.
    Error while building/deploying project samegame (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.11.2 for Android ARMv7))
    When executing step "Build Android APK"
    

  • Moderators

    @Blaster
    well "friend"... did you look up the error on the internet?!
    It will show up pretty fast that there is an issue in your machine/network and that services.gradle.org cannot be resolved



  • @raven-worx I do not have internet access, but I do not think it's necessary to compile applications


  • Moderators

    @Blaster said in "androiddeployqt.exe" exited with code 4:

    @raven-worx I do not have internet access, but I do not think it's necessary to compile applications

    no?
    so from where do your dependencies (this includes gradle libs) come from then?



  • @raven-worx I thought they were all in the JDK installation


Log in to reply