We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Please help! Compiling for Android issues

Home Forums General Questions Please help! Compiling for Android issues

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #71035
    alanzb
    Customer

    Hi, still having trouble building for android. Here’s the cmd lines:

    C:\Users\Alan\Downloads\NAVARRO_WEBAPP_R1>cordova platform add android
    “chcp” no se reconoce como un comando interno o externo,
    programa o archivo por lotes ejecutable.
    Using cordova-fetch for cordova-android
    Adding android project…
    Creating Cordova project for the Android platform:
    Path: platforms\android
    Package: com.example.NavarroWebappR1
    Name: Navarro Webapp R1
    Activity: MainActivity
    Android Target SDK: android-33
    Android Compile SDK: 33
    Subproject Path: CordovaLib
    Subproject Path: app
    Android project created with cordova-android@12.0.1
    Discovered plugin “cordova-plugin-whitelist”. Adding it to the project
    Installing “cordova-plugin-whitelist” for android
    Plugin doesn’t support this project’s cordova-android version. cordova-android: 12.0.1, failed version requirement: >=4.0.0 <10.0.0
    Skipping ‘cordova-plugin-whitelist’ for android
    Adding cordova-plugin-whitelist to package.json

    C:\Users\Alan\Downloads\NAVARRO_WEBAPP_R1>cordova requirements
    “chcp” no se reconoce como un comando interno o externo,
    programa o archivo por lotes ejecutable.

    Requirements check results for android:
    Java JDK: installed 1.8.0
    Android SDK: installed true
    Android target: installed android-34,android-33,android-32,android-30,android-26
    Gradle: installed C:\Gradle\gradle-7.6\bin\gradle.BAT

    C:\Users\Alan\Downloads\NAVARRO_WEBAPP_R1>cordova build android
    “chcp” no se reconoce como un comando interno o externo,
    programa o archivo por lotes ejecutable.
    Checking Java JDK and Android SDK versions
    ANDROID_HOME=C:\Users\Alan\AppData\Local\Android\Sdk (recommended setting)
    ANDROID_SDK_ROOT=undefined (DEPRECATED)
    Using Android SDK: C:\Users\Alan\AppData\Local\Android\Sdk
    Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use –status for details

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

    You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

    See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

    BUILD SUCCESSFUL in 7s
    1 actionable task: 1 executed
    Subproject Path: CordovaLib
    Subproject Path: app

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project ‘Navarro Webapp R1’.
    > Could not resolve all files for configuration ‘:classpath’.
    > Could not resolve com.android.tools.build:gradle:7.4.2.
    Required by:
    project :
    > No matching variant of com.android.tools.build:gradle:7.4.2 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute ‘org.gradle.plugin.api-version’ with value ‘7.6’ but:
    – Variant ‘apiElements’ capability com.android.tools.build:gradle:7.4.2 declares a library, packaged as a jar, and its dependencies declared externally:
    – Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
    – Other compatible attribute:
    – Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.6’)
    – Variant ‘javadocElements’ capability com.android.tools.build:gradle:7.4.2 declares a runtime of a component, and its dependencies declared externally:
    – Incompatible because this component declares documentation and the consumer needed a library
    – Other compatible attributes:
    – Doesn’t say anything about its target Java version (required compatibility with Java 8)
    – Doesn’t say anything about its elements (required them packaged as a jar)
    – Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.6’)
    – Variant ‘runtimeElements’ capability com.android.tools.build:gradle:7.4.2 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
    – Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
    – Other compatible attribute:
    – Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.6’)
    – Variant ‘sourcesElements’ capability com.android.tools.build:gradle:7.4.2 declares a runtime of a component, and its dependencies declared externally:
    – Incompatible because this component declares documentation and the consumer needed a library
    – Other compatible attributes:
    – Doesn’t say anything about its target Java version (required compatibility with Java 8)
    – Doesn’t say anything about its elements (required them packaged as a jar)
    – Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.6’)

    * Try:
    > Run with –stacktrace option to get the stack trace.
    > Run with –info or –debug option to get more log output.
    > Run with –scan to get full insights.

    * Get more help at https://help.gradle.org

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

    You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

    See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

    BUILD FAILED in 1s
    Command failed with exit code 1: C:\Users\Alan\Downloads\NAVARRO_WEBAPP_R1\platforms\android\gradlew -b C:\Users\Alan\Downloads\NAVARRO_WEBAPP_R1\platforms\android\build.gradle cdvBuildDebug

    Attachments:
    You must be logged in to view attached files.
    #71139

    Hi,
    It appears you running an older version of Java. The string:

    Java JDK: installed 1.8.0

    says that you have Java/JDK 8, but it’s required to have Java/JDK 11 for the latest versions of Cordova. Please upgrade Java and try again.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #71153
    alanzb
    Customer

    Hi! Many thanks for your answer.

    I’ve installed JDK11, however, it keeps saying the same:

    C:\Users\Alan\Downloads\NAVARRO_WEBAPP_R1>cordova platform add android
    “chcp” no se reconoce como un comando interno o externo,
    programa o archivo por lotes ejecutable.
    Using cordova-fetch for cordova-android
    Adding android project…
    Creating Cordova project for the Android platform:
    Path: platforms\android
    Package: com.example.NavarroWebappR2
    Name: Navarro Webapp R2
    Activity: MainActivity
    Android Target SDK: android-33
    Android Compile SDK: 33
    Subproject Path: CordovaLib
    Subproject Path: app
    Android project created with cordova-android@12.0.1
    Discovered plugin “cordova-plugin-whitelist”. Adding it to the project
    Installing “cordova-plugin-whitelist” for android
    Plugin doesn’t support this project’s cordova-android version. cordova-android: 12.0.1, failed version requirement: >=4.0.0 <10.0.0
    Skipping ‘cordova-plugin-whitelist’ for android
    Adding cordova-plugin-whitelist to package.json

    C:\Users\Alan\Downloads\NAVARRO_WEBAPP_R1>cordova requirements
    “chcp” no se reconoce como un comando interno o externo,
    programa o archivo por lotes ejecutable.

    Requirements check results for android:
    Java JDK: installed 1.8.0
    Android SDK: installed true
    Android target: installed android-34,android-33,android-32,android-30,android-26
    Gradle: installed C:\Gradle\gradle-7.6\bin\gradle.BAT

    I have no experience in development, so i will aprecciate your help. This is a project for an important costumer and i love Verge 3d

    Attachments:
    You must be logged in to view attached files.
    #71164

    In that case you might setup JAVA_HOME variable to point to your java installation. See the corresponding Cordova guide here.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.