2017-09-16 2 views
1

첫 번째 Ionic Cordova 앱 (날씨 앱)의 출시 버전을 만들고 "설치 속성 파일을 읽거나 만들지 못했습니다."라는 오류 메시지가 나타납니다. 아래 콘솔 출력에 나와 있습니다.Ionic CORDOVA - 설치 속성 파일을 읽거나 만들지 못했습니다.

분명히이 사용 권한 문제가 있지만 C : \ Program Files (x86) \ Android 폴더 (및 하위 디렉터리)에 대한 읽기 전용은 선택 취소했지만 여전히 동일한 문제가 있습니다. 내가 놓친 다른 것이 있습니까? 이걸 몇 시간 동안 붙잡 았어.

Visual Studio에서 내 응용 프로그램을 개발 중입니다. Android Studio가 설치되어 있지 않습니다.


C:\Dev\Zealand>ionic cordova build android --release 
[INFO] Running app-scripts build: --platform android --target cordova 

[14:58:54] build dev started ... [14:58:54] clean started ... 
[14:58:54] clean finished in 11 ms [14:58:54] copy started ... 
[14:58:54] transpile started ... [14:59:00] transpile finished in 
6.34 s [14:59:00] preprocess started ... [14:59:00] deeplinks started ... [14:59:00] deeplinks finished in 47 ms [14:59:00] 
preprocess finished in 57 ms [14:59:00] webpack started ... 
[14:59:00] copy finished in 6.86 s [14:59:15] webpack finished in 
15.31 s [14:59:15] sass started ... [14:59:18] sass finished in 2.44 s [14:59:18] postprocess started ... [14:59:18] removed unused font files [14:59:18] postprocess finished in 42 ms 
[14:59:18] lint started ... [14:59:18] build dev finished in 24.29 
s 
> ionic cordova prepare android 
> cordova prepare android [14:59:21] lint finished in 2.75 s 

> cordova build android × Running command - failed! 
     [ERROR] An error occurred while running cordova build android (exit code 1): 

    ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk 
    JAVA_HOME=C:\Program Files\java\jdk1.8.0_131 
    Subproject Path: CordovaLib 
    The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please 
    use Task.doLast(Action) instead. 
      at build_5uypyiboi6cuvi75t8w2rqt55.run(C:\Dev\Zealand\platforms\android\build.gradle:137) 
    Checking the license for package Android SDK Platform 25 in C:\Program Files 
    (x86)\Android\android-sdk\licenses 
    License for package Android SDK Platform 25 accepted. 
    Preparing "Install Android SDK Platform 25". 
    Warning: Failed to read or create install properties file. 

    BUILD FAILED 

    Total time: 6.774 secs 

    FAILURE: Build failed with an exception. 

    * What went wrong: 
    A problem occurred configuring root project 'android'. 
    > Failed to install the following SDK components: 
     [Android SDK Platform 25] 
     The SDK directory (C:\Program Files (x86)\Android\android-sdk) is not writeable, 
     please update the directory permissions. 

    * 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'. 
    > Failed to install the following SDK components: 
     [Android SDK Platform 25] 
     The SDK directory (C:\Program Files (x86)\Android\android-sdk) is not writeable, 
     please update the directory permissions. 

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

답변

0

안드로이드 SDK는, Program Files 폴더에 파일을 쓰기 때문에 문제를 거주. Android sdk를 C : \로 이동하고 환경 ANDROID_HOME 변수를 업데이트하여 문제가 해결되었습니다.

관련 문제