5월, 2018의 게시물 표시
Cordova로 개발하며 겪는 여러 문제 해결 방법(Some solutions when you developing Cordova Hybrid App.) 2. Build 단계 2.3 [macOS] cordova build android - 문제 -- The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. - 원인 -- 새로운 문법에 대한 경고 -- Gradle 5.0 에서 gradle script 의 문법 중 "<<"이 혼동스럽기 때문에 제거하겠다는 의미 ( 참고 ) - 해결방법 -- 굳이 해결 안해도 되나, 거슬린다면 "./platforms/android/build.gradle" (혹은 발생한 파일)  에서 "<<" 를 찾아서, 아래와 같이 고쳐준다. 예시 1) task cdvPrintProps << { // ... } ==> task cdvPrintProps { doLast { // ... } } 예시 2) tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Werror" } ==> tasks.withType(JavaCompile) { doLast { options.compilerArgs.add("-Xlint:unchecked") options.compilerArgs.add("-Werror") } } // 아래도 가능함 tasks.withType(JavaCompile) { optio
Cordova로 개발하며 겪는 여러 문제 해결 방법(Some solutions when you developing Cordova Hybrid App.) 2. Build 단계 2.2 [macOS] cordova build android - 문제 -- adb: failed to install .../platforms/android/build/outputs/apk/android-debug.apk: Failure [ INSTALL_FAILED_UPDATE_INCOMPATIBLE : Package com.test.app signatures do not match the previously installed version; ignoring!] - 원인 -- 이미 설치된 앱과 새로 설치할 앱의 인증이 달라서 덮어 씌워 설치하는 것이 안되는 문제 -- 보통 개발 단계에서, 인증된 파일을 설치하고, 다시 인증안된 앱을 설치할 때 발생할 수 있음 - 해결방법 -- 이전에 설치한 앱을 지우고 새로운 앱을 설치하면 됨 $ adb uninstall com.test.app
Cordova로 개발하며 겪는 여러 문제 해결 방법(Some solutions when you developing Cordova Hybrid App.) 1. Plugin 설치 1.2 [macOS] cordova: onesignal-cordova-plugin - 문제 -- OneSignal v2.x부터는 CocoaPod로 설치해야합니다. - 해결 $ sudo gem install cocoapod $ pod setup $ pod repo update - 다음과 같은 오류가 난 경우 -- repo master update 가 안된다면, $ pod install --repo-update -- Failed to install 'onesignal-cordova-plugin': Error: pod: Command failed with exit code 31 $ echo export LANG=en_US.UTF-8 >> ~/.bash_profile $ echo export LC_ALL=en_US.UTF-8 >> ~/.bash_profile - 참고 -- CocoaPods cache clearing 예시 1) $ pod cache clean -all 예시 2)  $ rm -rf "~/Library/Caches/CocoaPods" $ rm -rf "`pwd`/Pods/"

Cordova로 개발하며 겪는 여러 문제 해결 방법(Some solutions when you developing Cordova Hybrid App.)

Cordova로 개발하며 겪는 여러 문제 해결 방법(Some solutions when you developing Cordova Hybrid App.) 2. Build 단계 1.1 [macOS] cordova build android - 문제 -- Access Denied(__Error: spawn EACCES__) Running command: ./platforms/android/gradlew  cdvBuildDebug -b ./platforms/android/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true (node:8974) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: spawn EACCE (node:8974) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. - 해결방법 $ sudo chmod +x "./platforms/android/gradlew"