简体   繁体   English

如何将Ionic App Android API级别更新为26 ..

[英]How can i update ionic app android api level to 26..?

Initially i was using node version 4.5.0 cordova 6.0 and ionic version 1.7.2 to build the app. 最初,我使用的节点版本为4.5.0 cordova 6.0和离子版本为1.7.2,以构建应用程序。 now have upgraded all the tools (node version 8.11.3, cordova version 8.0.0 and ionic version 3.20.0) for upgrading the android api level. 现在已经升级了所有工具(节点版本8.11.3,cordova版本8.0.0和ionic版本3.20.0)以升级android api级别。 i removed android platform using cordova platform remove android and when i try to add android platform using command cordova platform add android it automatically adds version android 7.0.0 . 我使用cordova platform remove android ,当我尝试使用命令cordova platform add android它会自动添加android 7.0.0版本。 when i try cordova platform add android@8.0.0 it gives me the error. 当我尝试cordova platform add android@8.0.0它给了我错误。 I have installed android Sdk version 26. but i am not able to upgrade the api level. 我已经安装了Android SDK版本26。但是我无法升级api级。 please help. 请帮忙。

the error i am getting when try to upgrade 8.0.0 is 我在尝试升级8.0.0时遇到的错误是

$ cordova platform add android@8.0.0 Running command: /home/ubuntu/git/webrino/webrino-ionic/hooks/before_platform_add/init_directories.js /home/ubuntu/git/webrino/webrino-ionic Using cordova-fetch for cordova-android@8.0.0 (node:20325) UnhandledPromiseRejectionWarning: CordovaError: Failed to fetch platform cordova-android@8.0.0 Probably this is either a connection problem, or platform spec is incorrect. $ cordova平台添加android@8.0.0运行命令:/home/ubuntu/git/webrino/webrino-ionic/hooks/before_platform_add/init_directories.js / home / ubuntu / git / webrino / webrino-ionic使用cordova-fetch for cordova -android@8.0.0(节点:20325)UnhandledPromiseRejectionWarning:CordovaError:无法获取平台cordova-android@8.0.0可能是连接问题,或者平台规格不正确。 Check your connection and platform name/version/URL. 检查您的连接和平台名称/版本/ URL。 Error: npm: Command failed with exit code 1 Error output: npm ERR! 错误:npm:命令失败,退出代码为1错误输出:npm ERR! code ETARGET npm ERR! 代码ETARGET npm ERR! notarget No matching version found for cordova-android@8.0.0 npm ERR! notarget没有找到cordova-android@8.0.0 npm ERR的匹配版本! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget在大多数情况下,您或您的一个依赖项正在请求npm ERR! notarget a package version that doesn't exist. notarget不存在的软件包版本。

npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! 可以在以下位置找到该运行的完整日志:npm ERR!
/home/ubuntu/.npm/_logs/2018-07-12T04_30_18_048Z-debug.log at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform/addHelper.js:312:25 at _rejected (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:797:24) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:823:30 at Promise.when (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1142:31) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:808:41) at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44 at runSingle (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:137:13) at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:125:13) at process._tickCallback (internal/process/next_tick.js:112:11) (node:20325) UnhandledPromiseRejectionWarning: Unhandled promise rejection. /home/ubuntu/.npm/_logs/2018-07-12T04_30_18_048Z-debug.log位于/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform/addHelper.js:312:25在_rejected(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:797:24)在/ usr / local / lib / node_modules / cordova / node_modules / cordova-lib / Promise.when(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1142:31)的Promise.promise.promiseDispatch(/ usr / local)上的node_modules / q / q.js:823:30 /lib/node_modules/cordova/node_modules/q/q.js:808:41)在/usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44在runSingle(/ usr / local /在process._tickCallback(内部)刷新时(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:125:13)lib / node_modules / cordova / node_modules / q / q.js:137:13) /process/next_tick.js:112:11)(节点:20325)UnhandledPromiseRejectionWarning:未处理的承诺拒绝。 This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). 引发此错误的原因可能是抛出了一个没有catch块的异步函数,或者是拒绝了一个.catch()无法处理的承诺。 (rejection id: 1) (node:20325) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. (拒绝ID:1)(节点:20325)[DEP0018] DeprecationWarning:已弃用未处理的承诺拒绝。 In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 将来,未处理的承诺拒绝将以非零退出代码终止Node.js进程。

Cordova-android version 7.XX is the latest Android package according to their website itself. 根据其网站本身,Cordova-android版本7.XX是最新的Android软件包。

Reference 参考

I think what you're looking for is the equivalent android version. 我认为您正在寻找的是等效的android版本。 Installing android platform ~7.0.0 is the correct latest version you are looking for. 安装Android平台〜7.0.0是您要寻找的正确最新版本。

Also, upgrading the tools itself is not the same as upgrading the application you built before. 另外,升级工具本身与升级之前构建的应用程序不同。 Ionic v1 is very different from Ionic v3 and many things have changed so you need to edit the code before the program will work like it did before. Ionic v1与Ionic v3有很大的不同,并且许多事情已经更改,因此您需要先编辑代码,然后程序才能像以前一样工作。 Check out Ionic V1- V2 . 查看Ionic V1- V2 Upgrade to V2 before you upgrade to V3 as it makes things easier. 在升级到V3之前先升级到V2,因为它使事情变得更容易。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Delphi Android应用API级别26? - Delphi Android app API level 26? 如何在Ionic Cordova中将Android-SDK 23更新为26? - How can I update Android-SDK 23 to 26 in Ionic Cordova? 如何在 NativeScript 中实现 Android 后台服务,同时针对 API 级别 26+ 及以下 - How can I implement Android Background Service in NativeScript targeting both API Level 26+ and below 如果Google只接受Api等级为26或更高的应用程序,为什么我仍可以发布Api低于26的应用程序? - Why I can still publish app that has Api level lower than 26 if google will only accept apps with Api level 26 or newer? 如何在Android 8.0 Oreo API 26及更高版本上检测到应用终止 - How can I detect app kill on Android 8.0 Oreo API 26 and after 无法在 android oreo(API 级别 26)上以设备管理员身份激活应用 - Unable to activate app as device admin on android oreo(API level 26) 应用程序 API 级别 26 和 Android 7? - Application API LEVEL 26 and Android 7? kivy android app:将api级别从19设置为26失败 - kivy android app: Set the api level from 19 to 26 failed 有没有办法从UNITY 5.6.6发布API级别为26的Android应用程序? - Is there a way for publishing an Android App with API level 26 from UNITY 5.6.6? 我有一个API级为26的android studio,但是我的手机是API level22。 这些应用程序能否以API级别26运行? - I have an android studio with API level 26, but my phone is API level22. Would the apps able to run with API level 26?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM