1
resposta

Cordova não builda

Isso tá aparecendo quando eu tento compilar pro dispositivo:

Pro browser tá de boa!

C:\Users\garconapp>cordova run android --device
ANDROID_HOME=C:\Users\Conrado\Downloads\Aprender\adt-bundle-windows-x86_64-201407
02\adt-bundle-windows-x86_64-20140702\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_172
Subproject Path: CordovaLib
Incremental java compilation is an incubating feature.


BUILD FAILED

Total time: 7.354 secs
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
   > Could not find com.android.support:appcompat-v7:27.0.0.
     Required by:
         :android:unspecified
   > Could not find com.android.support:support-v4:27.0.0.
     Required by:
         :android:unspecified
   > Could not find com.android.support:support-v4:27.0.0.
     Required by:
         :android:unspecified > com.google.android.gms:play-services-gcm:9.8.0 >
 com.google.android.gms:play-services-basement:9.8.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
   > Could not find com.android.support:appcompat-v7:27.0.0.
     Required by:
         :android:unspecified
   > Could not find com.android.support:support-v4:27.0.0.
     Required by:
         :android:unspecified
   > Could not find com.android.support:support-v4:27.0.0.
     Required by:
         :android:unspecified > com.google.android.gms:play-services-gcm:9.8.0 >
 com.google.android.gms:play-services-basement:9.8.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
1 resposta

Oi Conrado, por algum motivo o projeto Android parece estar bugado ou faltando coisas.

Eu tentaria regera-lo do zero. Faz assim:

cordova platform rm android
cordova platform add android

Assim ele regera todo o projeto e (com sorte) dessa vez vem tudo ok