lệnh của bạn: ion cordova build androird là sai
tôi nghĩ rằng bạn có nghĩa là: cordova ion xây dựng android
Nhưng thử thêm: cordova ion xây dựng --release android
tôi đã có lỗi tương tự, sau 2 ngày kể từ khi gỡ lỗi Tôi tìm thấy một giải pháp cho tôi:
trong thư mục: nền tảng/android/cordova tôi cập nhật trong file Api.js các địa điểm đối tượng, bởi vì con đường không chính xác.
địa điểm hiện tại đối tượng giống như thế này trong Api.js tôi:
this.locations = {
root: self.root,
www: path.join(self.root, 'assets/www'),
res: path.join(self.root, 'res'),
platformWww: path.join(self.root, 'platform_www'),
configXml: path.join(self.root, 'app/src/main/res/xml/config.xml'),
defaultConfigXml: path.join(self.root, 'cordova/defaults.xml'),
strings: path.join(self.root, 'app/src/main/res/values/strings.xml'),
manifest: path.join(self.root, 'app/src/main/AndroidManifest.xml'),
build: path.join(self.root, 'build'),
javaSrc: path.join(self.root, 'app/src/main/java/'),
// NOTE: Due to platformApi spec we need to return relative paths here
cordovaJs: 'bin/templates/project/assets/www/cordova.js',
cordovaJsSrc: 'cordova-js-src'
};
Sau những thay đổi tôi đã có thể xây dựng ứng dụng của tôi. Tôi cũng gặp lỗi vì các plugin như bộ lưu trữ cordova-sqlite nên tôi đã xóa nó và tạo ứng dụng.
Tôi hy vọng nó giúp
Bạn đã kiểm tra sự tồn tại của hoặc các điều khoản trên các tập tin được đề cập trong báo lỗi? –