2016-05-04 13 views
0

私はPhonegapとcordovaを始めています。私は既存のプロジェクトを構築する作業を持っています。cordova build/run androidコマンドがウィンドウで動作しないのですか?

cordova build android 

をしかし、それが正常に構築されていない、と示すが、エラーログ以下:だから私は、プロジェクトのルートderictoryで次のコマンドを発射している私は、Mac上で同じプロジェクトをビルドする

D:\Git\xyz\myCart>cordova platforms 
Installed platforms: android 4.0.0, ios 3.8.0 
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, webos, win 
dows, windows8, wp8 

D:\Git\xyz\myCart>cordova build android 
Running command: "C:\Program Files\nodejs\node.exe" D:\Git\xyz\myCart\ 
hooks\before_prepare\add_plugins.js D:\Git\xyz\myCart 
(node) sys is deprecated. Use util instead. 
(node) util.puts is deprecated. Use console.log instead. 




Running command: "C:\Program Files\nodejs\node.exe" D:\Git\xyz\myCart\ 
hooks\before_prepare\text_replace.js D:\Git\xyz\myCart 
Running command: "C:\Program Files\nodejs\node.exe" D:\Git\xyz\myCart\ 
hooks\after_prepare\text_replace.js D:\Git\xyz\myCart 
Running command: cmd "/s /c "D:\Git\xyz\myCart\platforms\android\cordo 
va\build.bat"" 
ANDROID_HOME=D:\2015\tools\adt-bundle-windows-x86_64-20140702\sdk 
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60 
Running: D:\Git\xyz\myCart\platforms\android\gradlew cdvBuildDebug -b 
D:\Git\xyz\myCart\platforms\android\build.gradle -Dorg.gradle.daemon=t 
rue 
embedded 
WARNING [Project: :] Current NDK support is deprecated. Alternative will be pro 
vided in the future. 
WARNING [Project: :] Current NDK support is deprecated. Alternative will be pro 
vided in the future. 
WARNING [Project: :] Current NDK support is deprecated. Alternative will be pro 
vided in the future. 
WARNING [Project: :] Current NDK support is deprecated. Alternative will be pro 
vided in the future. 
org.xwalk:xwalk_core_library:14+ 

FAILURE: Build failed with an exception. 

* What went wrong: 
A problem occurred configuring root project 'android'. 
> Could not resolve all dependencies for configuration ':_armv7DebugCompile'. 
    > Could not find any version that matches com.google.android.gms:play-service 
s-analytics:+. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/com/google/android/gms/play-services-ana 
lytics/maven-metadata.xml 
     https://repo1.maven.org/maven2/com/google/android/gms/play-services-ana 
lytics/ 
     https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com 
/google/android/gms/play-services-analytics/maven-metadata.xml 
     https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com 
/google/android/gms/play-services-analytics/ 
    Required by: 
     :android:unspecified 
    > Could not find any version that matches com.google.android.gms:play-service 
s-gcm:+. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm 
/maven-metadata.xml 
     https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm 
/
     https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com 
/google/android/gms/play-services-gcm/maven-metadata.xml 
     https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com 
/google/android/gms/play-services-gcm/ 
    Required by: 
     :android:unspecified 
    > Could not find any version that matches com.android.support:support-v4:+. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/com/android/support/support-v4/maven-met 
adata.xml 
     https://repo1.maven.org/maven2/com/android/support/support-v4/ 
     https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com 
/android/support/support-v4/maven-metadata.xml 
     https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com 
/android/support/support-v4/ 
    Required by: 
     :android:unspecified 

* 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: 10.089 secs 

D:\Git\xyz\myCart\platforms\android\cordova\node_modules\q\q.js:126 
        throw e; 
        ^
Error code 1 for command: cmd with args: /s /c "D:\Git\xyz\myCart\pla 
tforms\android\gradlew cdvBuildDebug -b D:\Git\xyz\myCart\platforms\an 
droid\build.gradle -Dorg.gradle.daemon=true" 
ERROR building one of the platforms: Error: cmd: Command failed with exit code 
1 
You may not have the required environment or OS to build this project 
Error: cmd: Command failed with exit code 1 

D:\Git\xyz\myCart> 

は、それが正常にビルドしますが、私のWindows 7 64ビットマシンではありません。 誰かが私の問題を解決するのを助けることができます。

+1

このリンクが役立つことを願っています - http://stackoverflow.com/questions/31748218/google-analytics-with-ionic – Gandhi

答えて

0

私の解決策を見つけました。私はちょうどGoogle RepositoryAndroid support Repositoryをインストールしましたが、私のアンドロイドSDKにはありませんでした。

関連する問題