初学者求救 cordova platform add android 和cordova build问题
cordova platform add android 后显示的是Adding android project...
Running command: cmd "/s /c "C:\Users\Administrator\.cordova\lib\npm_cache\cordo
va-android\4.1.1\package\bin\create.bat C:\Users\Administrator\hello\platforms\android com.example.hello HelloWorld --cli""
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.example.hello
Name: HelloWorld
Activity: MainActivity
Android target: android-22
Copying template files...
Android project created with cordova-android@4.1.1
Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for android
This plugin is only applicable for versions of cordova-android greater than 4.0.
If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
这个zhengv
cordova build出现的问题是
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:1.0.0+.
Required by:
:android:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://repo1.maven.org/maven2/co
m/android/tools/build/gradle/maven-metadata.xml.
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/bu
ild/gradle/maven-metadata.xml'.
> peer not authenticated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
跪求大神帮忙
你第一个问题好像是加载cordova-plugin-whitelist 这个插件只适用于4.0以上的版本 第二个看着像环境变量的问题 看完phoengap3.4安装教程以后自己尝试,运行cordova build或者cordova runandroid的时候可能出现,
please install Android target:“Android-22”这样的错误
这个时候不要急,解决方法就是更新sdk(由于翻墙等各种问题,本来一件很简单的事情变得复杂,所以看看下面帖子,更新一下sdk就ok了)
http://bbs.phonegap100.com/thread-1787-1-1.html
网站首页新手必看里面筛选的
页:
[1]