我配置了离子android开发环境。我可以在Android Studio 2.2.2中打开我的Android项目,并在模拟器中启动应用程序,并且它可以正常工作。离子:无法从终端启动android模拟器
但是,如果我去我的终端,去我的离子项目。并建立或模仿机器人,如:
ionic build android
ionic emulate android
我得到一个错误:
Error: /Users/alex_fimm_dev/Desktop/Projects/ionic/myApp2/platforms/android/gradlew: 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 ':_debugApk'.
> A problem occurred configuring project ':CordovaLib'.
> Could not resolve all dependencies for configuration ':CordovaLib:classpath'.
> Could not find com.android.tools.build:gradle:2.2.2.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jar
Required by:
android:CordovaLib:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
同样的项目运行良好Android上的工作室。
不知道我是否失去了一些步骤或什么,昨天开始用离子。
下面是我的一些版本:
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Android 7.1.1 API 25
Android SDK Tools 25.2.4
Android Platform-Tools 25.0.3
Cordova 6.4.0
node 7.3.0
npm 4.0.5
os x yosemite 10.10.2
'离子运行android' –