0

I am facing issue while compiling Qt with android.Kindly help me to solve this issue.

issue :

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'android-build'.

    Could not resolve all dependencies for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:2.2.3. Required by: project : Could not resolve com.android.tools.build:gradle:2.2.3. Could not get resource 'https: //jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'. Could not GET 'https:// jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'. Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed: Connection timed out: connect Could not resolve com.android.tools.build:gradle:2.2.3. Could not get resource 'https:// maven.google.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'. Could not GET 'https: //maven.google.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'. Connect to maven.google.com:443 [maven.google.com/172.217.26.163] failed: Connection timed out: connect

  • 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: 46.542 secs Building the android package failed! -- For more information, run this command with --verbose. 10:51:50: The process "C:\Qt\Qt5.9.0\5.9\android_armv7\bin\androiddeployqt.exe" exited with code 14. Error while building/deploying project calqlatr (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.9.0 for Android armv7)) When executing step "Build Android APK"

gradle.build:

buildscript { 
    repositories { jcenter() } 
    dependencies { classpath 'com.android.tools.build:gradle:2.2.3' } 
} 

allprojects { 
     repositories { jcenter() } 
} 
apply plugin: 'com.android.application' 
dependencies { 
   compile fileTree(dir: 'libs', include: ['*.jar']) 
} 

gradle.properties:

 androidBuildToolsVersion=26.0.0 androidCompileSdkVersion=18 buildDir=build qt5AndroidDir=C:/Qt/Qt5.9.0/5.9/android_armv7/src/android/ja‌​va 
Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
narthan_l
  • 21
  • 7
  • The link is correct. Check your connection – Gabriele Mariotti Oct 09 '17 at 06:28
  • Hi Gabriele mariotte, Thanks for reply. Check connection means? internet is working properly . i need to check proxy settings? if so.. what changes i have to do ? it will be reply help me to solve this problem. – narthan_l Oct 09 '17 at 06:48
  • If you are using a proxy, you have to set the proxy also for gradle (or your IDE) – Gabriele Mariotti Oct 09 '17 at 06:53
  • Hi Gabriele. i am not using any proxy settings, i faced some issues while compiling so i changed as below https://stackoverflow.com/questions/46603811/error-while-compiling-qt-5-9-0-with-android after that i started getting this issue. – narthan_l Oct 09 '17 at 07:06

1 Answers1

0

now it Generated apk files and able see application in emulator.

solution which worked for me :

unchecked use gradle instead of ant in Qt tools option.

unchecked Use gradle option in Qt projects(Build Android APK).

narthan_l
  • 21
  • 7