Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13971

Cannot Build Hello World App

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 8.0.0
    • None
    • cordova-android
    • None

    Description

      I followed the instructions for creating my first cordova app on https://cordova.apache.org/docs/en/latest/guide/cli/index.html 

      I am running Debian 9.3 (Stretch), Node 9.7.1 and npm 5.7.1. I can build an android app using my Android Studio setup, but I cannot build a Cordova app.

      $ cordova requirements
      Android Studio project detected

      Requirements check results for android:
      Java JDK: installed 1.8.0
      Android SDK: installed true
      Android target: installed android-27,android-26,android-24
      Gradle: installed /opt/android-studio/gradle/gradle-4.1/bin/gradle

       

      I ran into the issue described here https://github.com/ionic-team/ionic-cli/issues/2835 and when I changed the permissions of my gradle file, I no longer got the "spawn EACCES" error. I do get a different error though:

      $ cordova build android
      Android Studio project detected
      ANDROID_HOME=/usr/lib/android-sdk
      JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
      studio

      FAILURE: Build failed with an exception.

      • What went wrong:
        Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
      • Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

      BUILD FAILED in 0s
      (node:29070) UnhandledPromiseRejectionWarning: Error: /opt/android-studio/gradle/gradle-4.1/bin/gradle: Command failed with exit code 1
      at ChildProcess.whenDone (/home/aaron/Omilia/cordova-toy/MyApp/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
      at ChildProcess.emit (events.js:127:13)
      at maybeClose (internal/child_process.js:936:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
      (node:29070) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
      (node:29070) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

      I'm not really sure where InvokerHelper is located. Are there additional dependencies that are not included in the tutorial that would fix this failure?

      Thanks,

      Aaron

      Attachments

        Activity

          People

            bowserj Joey Robert Bowser
            asuarez Aaron Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: