1

이온 안드로이드 개발 환경을 구성했습니다. 안드로이드 스튜디오 2.2.2에서 내 안드로이드 프로젝트를 열고 에뮬레이터에서 응용 프로그램을 시작하면 모두 잘 동작합니다.ionic : 터미널에서 안드로이드 에뮬레이터를 실행할 수 없습니다.

하지만 터미널에 가서 내 이온 프로젝트에 가면. 그리고 구축하거나 모방 안드로이드처럼 :

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. 

가 다시 프로젝트가 안드로이드 스튜디오에서 잘 실행 :

ionic build android 
ionic emulate android 

오류가 발생합니다.

몇 가지 단계가 빠진 경우 확실하지 않습니다. 어제 ionic으로 시작했습니다.

은 여기 내 버전의 일부입니다 :

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 
+0

'이온 실행 android' –

답변

1

제거하십시오 플랫폼/안드로이드 폴더

ionic platform rm android 

을 다시 안드로이드를 추가

ionic platform add android 
+1

너무 감사합니다 많은 손님 –

+0

항상 환영 :) – skydroid