Android Build failed (gradle)

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Android Build failed (gradle)

    Hallo,
    ich habe soeben node und cordova neu installiert und bekomme nun nach dem Hinzufügen von Android zum Beispielprojekt die folgende Fehlermeldung:

    Brainfuck-Quellcode

    1. PS C:\Users\Daniel\CordovaTest> cordova build android
    2. ANDROID_HOME=C:\Users\Daniel\AppData\Local\Android\sdk
    3. JAVA_HOME=C:\Program Files\Java\jdk1.8.0_65
    4. FAILURE: Build failed with an exception.
    5. * What went wrong:
    6. Unable to start the daemon process.
    7. This problem might be caused by incorrect configuration of the daemon.
    8. For example, an unrecognized jvm option is used.
    9. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
    10. Please read the following process output to find out more:
    11. -----------------------
    12. 23:32:58.742 [main] DEBUG o.g.l.daemon.bootstrap.DaemonMain - Assuming the daemon was started with following jvm opts: [
    13. -XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=windows-1252, -Duser.country=DE, -Duse
    14. r.language=de, -Duser.variant]
    15. 23:32:59.205 [main] DEBUG o.g.l.daemon.server.DaemonServices - Creating daemon context with opts: [-XX:MaxPermSize=256m,
    16. -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=windows-1252, -Duser.country=DE, -Duser.language=de, -Duser
    17. .variant]
    18. 23:32:59.251 [INFO] [org.gradle.launcher.daemon.server.Daemon] start() called on daemon - DefaultDaemonContext[uid=c7171
    19. 09d-05b4-4c6e-98b2-062e35f6a0b6,javaHome=C:\Program Files\Java\jdk1.8.0_65,daemonRegistryDir=C:\Users\Daniel\.gradle\dae
    20. mon,pid=3812,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encod
    21. ing=windows-1252,-Duser.country=DE,-Duser.language=de,-Duser.variant]
    22. 23:32:59.260 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] updating lastActivityAt to 1458772379259
    23. 23:32:59.377 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding IP addresses for network inte
    24. rface Software Loopback Interface 1
    25. 23:32:59.379 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a loopback interface? true
    26. 23:32:59.381 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a multicast interface? true
    27. 23:32:59.382 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding loopback address /127.0.0.1
    28. 23:32:59.383 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding loopback address /0:0:0:0:0:0
    29. :0:1
    30. 23:32:59.383 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding loopback multicast interface
    31. Software Loopback Interface 1
    32. 23:32:59.384 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding IP addresses for network inte
    33. rface WAN Miniport (SSTP)
    34. 23:32:59.386 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a loopback interface? false
    35. 23:32:59.388 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a multicast interface? true
    36. 23:32:59.389 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding loopback multicast interface
    37. WAN Miniport (SSTP)
    38. 23:32:59.389 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding IP addresses for network inte
    39. rface WAN Miniport (L2TP)
    40. 23:32:59.391 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a loopback interface? false
    41. 23:32:59.394 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a multicast interface? true
    42. 23:32:59.394 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding loopback multicast interface
    43. WAN Miniport (L2TP)
    44. 23:32:59.395 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding IP addresses for network inte
    45. rface WAN Miniport (PPTP)
    46. 23:32:59.397 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a loopback interface? false
    47. 23:32:59.399 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a multicast interface? true
    48. 23:32:59.399 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding loopback multicast interface
    49. WAN Miniport (PPTP)
    50. 23:32:59.399 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding IP addresses for network inte
    51. rface WAN Miniport (PPPOE)
    52. 23:32:59.401 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a loopback interface? false
    53. 23:32:59.403 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a multicast interface? true
    54. 23:32:59.404 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding loopback multicast interface
    55. WAN Miniport (PPPOE)
    56. 23:32:59.404 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding IP addresses for network inte
    57. rface WAN Miniport (IPv6)
    58. [
    59. .
    60. .
    61. .
    62. ]
    63. 23:32:59.570 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] Daemon starting at: Wed Mar 23 23:32:59 CET 2016, with a
    64. ddress: [d2f0d559-cb2a-40a1-8553-692c9e61a70a port:58081, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]]
    65. 23:32:59.580 [INFO] [org.gradle.launcher.daemon.server.DomainRegistryUpdater] Advertising the daemon address to the clie
    66. nts: [d2f0d559-cb2a-40a1-8553-692c9e61a70a port:58081, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]]
    67. 23:32:59.580 [DEBUG] [org.gradle.launcher.daemon.server.DomainRegistryUpdater] Advertised daemon context: DefaultDaemonC
    68. ontext[uid=c717109d-05b4-4c6e-98b2-062e35f6a0b6,javaHome=C:\Program Files\Java\jdk1.8.0_65,daemonRegistryDir=C:\Users\Da
    69. niel\.gradle\daemon,pid=3812,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx10
    70. 24m,-Dfile.encoding=windows-1252,-Duser.country=DE,-Duser.language=de,-Duser.variant]
    71. 23:32:59.580 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Storing daemon address: [d2f0d559-cb
    72. 2a-40a1-8553-692c9e61a70a port:58081, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], context: DefaultDaemonContext[uid=c7171
    73. 09d-05b4-4c6e-98b2-062e35f6a0b6,javaHome=C:\Program Files\Java\jdk1.8.0_65,daemonRegistryDir=C:\Users\Daniel\.gradle\dae
    74. mon,pid=3812,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encod
    75. ing=windows-1252,-Duser.country=DE,-Duser.language=de,-Duser.variant]
    76. 23:32:59.580 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addr
    77. esses registry.
    78. 23:32:59.590 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
    79. 23:32:59.590 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
    80. 23:32:59.590 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addr
    81. esses registry.
    82. 23:32:59.590 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
    83. 23:32:59.590 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
    84. 23:32:59.600 [ERROR] [system.err]
    85. 23:32:59.600 [ERROR] [system.err] FAILURE: Build failed with an exception.
    86. 23:32:59.600 [ERROR] [system.err]
    87. 23:32:59.600 [ERROR] [system.err] * What went wrong:
    88. 23:32:59.600 [ERROR] [system.err] Could not write cache value to 'C:\Users\Daniel\.gradle\daemon\2.2.1\registry.bin'.
    89. 23:32:59.600 [ERROR] [system.err]
    90. 23:32:59.600 [ERROR] [system.err] * Try:
    91. 23:32:59.600 [ERROR] [system.err] Run with --stacktrace option to get the stack trace. Run with --info or --debug option
    92. to get more log output.
    93. 23:32:59.600 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Removing daemon address: [d2f0d559-c
    94. b2a-40a1-8553-692c9e61a70a port:58081, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]]
    95. 23:32:59.600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addr
    96. esses registry.
    97. 23:32:59.610 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
    98. 23:32:59.610 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
    99. 23:32:59.610 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addr
    100. esses registry.
    101. 23:32:59.610 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
    102. 23:32:59.610 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
    103. 23:32:59.610 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] VM shutdown hook was unable to remove the daemon address
    104. from the registry. It will be cleaned up later.
    105. org.gradle.api.GradleException: Could not write cache value to 'C:\Users\Daniel\.gradle\daemon\2.2.1\registry.bin'.
    106. at org.gradle.cache.internal.SimpleStateCache.serialize(SimpleStateCache.java:74)
    107. at org.gradle.cache.internal.SimpleStateCache.access$100(SimpleStateCache.java:28)
    108. at org.gradle.cache.internal.SimpleStateCache$2.run(SimpleStateCache.java:50)
    109. at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:17
    110. 3)
    111. at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:163)
    112. at org.gradle.cache.internal.OnDemandFileAccess.writeFile(OnDemandFileAccess.java:56)
    113. at org.gradle.cache.internal.SimpleStateCache.set(SimpleStateCache.java:48)
    114. at org.gradle.cache.internal.FileIntegrityViolationSuppressingPersistentStateCacheDecorator.set(FileIntegrityVio
    115. lationSuppressingPersistentStateCacheDecorator.java:38)
    116. at org.gradle.cache.internal.FileIntegrityViolationSuppressingPersistentStateCacheDecorator.update(FileIntegrity
    117. ViolationSuppressingPersistentStateCacheDecorator.java:46)
    118. at org.gradle.launcher.daemon.registry.PersistentDaemonRegistry.remove(PersistentDaemonRegistry.java:109)
    119. at org.gradle.launcher.daemon.server.Daemon$1.run(Daemon.java:100)
    120. Caused by: java.io.FileNotFoundException: C:\Users\Daniel\.gradle\daemon\2.2.1\registry.bin (Zugriff verweigert)
    121. at java.io.FileOutputStream.open0(Native Method)
    122. at java.io.FileOutputStream.open(FileOutputStream.java:270)
    123. at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    124. at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
    125. at org.gradle.cache.internal.SimpleStateCache.serialize(SimpleStateCache.java:67)
    126. ... 10 more
    127. Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
    128. * Try:
    129. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    130. Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\Daniel\CordovaTest\platforms\android\gradlew cdvBuildDeb
    131. ug -b C:\Users\Daniel\CordovaTest\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=tru
    132. e"
    Alles anzeigen


    Zur Besseren Übersicht habe ich bei [...] die Ausgabe entfernt, da sie da ewig so weitergeht.

    Weiß jemand wie ich das wieder zum Laufen bekomme?

    Viele Grüße,
    Daniel
  • Hallo,
    das Projekt besteht derzeit nur aus den Dateien die nach einem

    Quellcode

    1. cordova create ...
    angelegt werden.

    Das ursprüngliche Problem war, dass ich die Release APK eines anderen, "richtigen" Projekts nicht installieren konnte. Siehe auch hier dazu meine Frage im englischen ionic-Forum forum.ionicframework.com/t/rel…-installation-fails/45711 (Das exakt gleiche Problem bestand jedoch auch, wenn ich nur mit cordova gearbeitet habe, also ist ionic nicht schuld daran :))

    Dann habe ich jetzt cordova, node, npm neu installiert und komme bei einem neuen Projekt auf den oben angegebenen Fehler. Meine Hoffnung war ja, dass im eigentlichen Projekt der Fehler durch eine falsche Konfigurationsdatei/Plugin/etc. zustande kommt und ich jetzt Schritt für Schritt aus dem alten Projekt die Sachen ins neue, leere kopiere bis ich wieder auf den Fehler stoße und diesen dann hoffentlich beheben kann.

    Cordova Version ist übrigens 6.1.0 und OS ist Windows7.

    Viele Grüße,
    Daniel
  • Danke! Das Problem mit gradle wurde damit gelöst.

    Leider lässt sich die Release APK weiterhin nicht installieren und anscheinend ist es ein Problem mit Cordova, da es beim neuen, leeren Projekt ebenso nicht geht.
    Die debug APK lässt sich wunderbar installieren (über cordova run android als auch nach dem manuellen Kopieren auf das Gerät).

    Hast du dazu noch eine Idee oder am Besten ein neues Thema dazu starten?

    Viele Grüße,
    Daniel