방금 "새로운"ionic 앱을 만들었지 만 Cordova를 사용하여 APK를 빌드 할 수 없습니다. 새 프로젝트를 만들고 이전 프로젝트의 src 위에 복사했기 때문에 new를 따옴표로 묶었습니다. 해당 프로젝트의 플러그인 설치 종속성에 문제가 발생하여 깨끗한 것부터 시작하기로 결정했습니다.
새 프로젝트를 시작하고 필요한 모든 플러그인을 설치했습니다. 브라우저에서 예상대로 작동하는 것 같습니다.
내가 실행할 때 ionic cordova build android
이것은 출력입니다.
PS D:\Ionic\PigsNBulls\PigsNBulls> ionic cordova build android
> ionic-app-scripts build --target cordova --platform android
[20:21:27] ionic-app-scripts 3.2.0
[20:21:27] build dev started ...
[20:21:27] clean started ...
[20:21:27] clean finished in 16 ms
[20:21:27] copy started ...
[20:21:27] deeplinks started ...
[20:21:27] deeplinks finished in 111 ms
[20:21:27] transpile started ...
[20:21:31] transpile finished in 3.56 s
[20:21:31] preprocess started ...
[20:21:31] preprocess finished in 3 ms
[20:21:31] webpack started ...
[20:21:31] copy finished in 3.84 s
[20:21:36] webpack finished in 5.03 s
[20:21:36] sass started ...
[20:21:37] sass finished in 1.24 s
[20:21:37] postprocess started ...
[20:21:37] postprocess finished in 12 ms
[20:21:37] lint started ...
[20:21:37] build dev finished in 10.14 s
[20:21:40] lint finished in 3.12 s
> cordova build android
Android Studio project detected
(node:16624) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Invalid data, chunk must be a string or buffer, not object
(node:16624) [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.
PS D:\Ionic\PigsNBulls\PigsNBulls>
이 새로운 프로젝트 전에는 잘 작동했습니다.
위의 오류를 일으키는 최신 cordova 8.0.0이있을 수 있다고 생각합니다. 아래 명령을 사용하십시오.
npm install -g [email protected]
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다