离子运行android似乎工作,但该应用程序没有在手机上启动,为什么?

离子运行android似乎工作,但该应用程序没有在手机上启动,为什么?,第1张

概述我的手机处于打开状态,处于调试模式,我已通过adb devices -l确认了这一点. 当我运行离子运行 android时,我得到Ionic声称应用程序启动时的输出,但手机上没有任何反应.我使用 Android 4.4.4的Nexus 5. $ionic run androidadd to body class: platform-androidRunning command: /Users/ 我的手机处于打开状态,处于调试模式,我已通过adb devices -l确认了这一点.
当我运行离子运行 android时,我得到Ionic声称应用程序启动时的输出,但手机上没有任何反应.我使用 Android 4.4.4的Nexus 5.
$ionic run androIDadd to body class: platform-androIDRunning command: /Users/kristoffer/web/photoApp/platforms/androID/cordova/run Buildfile: /Users/kristoffer/web/photoApp/platforms/androID/build.xml-set-mode-check:-set-deBUG-files:-check-env: [checkenv] AndroID SDK Tools Revision 22.6.2 [checkenv] Installed at /Development/adt-bundle/sdk-setup:     [echo] Project name: KvittoScanner  [gettype] Project Type: Application-set-deBUG-mode:-deBUG-obfuscation-check:-pre-build:-build-setup:[getbuildtools] Using latest Build Tools: 19.0.3     [echo] Resolving Build Target for KvittoScanner...[gettarget] Project Target:   AndroID 4.4.2[gettarget] API level:        19     [echo] ----------     [echo] Creating output directorIEs if needed...     [echo] ----------     [echo] Resolving DependencIEs for KvittoScanner...[dependency] library dependencIEs:[dependency] [dependency] ------------------[dependency] Ordered librarIEs:[dependency] [dependency] ------------------     [echo] ----------     [echo] Building librarIEs with 'deBUG'...nodeps:-set-mode-check:-set-deBUG-files:-check-env: [checkenv] AndroID SDK Tools Revision 22.6.2 [checkenv] Installed at /Development/adt-bundle/sdk-setup:     [echo] Project name: Cordovalib  [gettype] Project Type: AndroID library-set-deBUG-mode:-deBUG-obfuscation-check:-pre-build:-build-setup:[getbuildtools] Using latest Build Tools: 19.0.3     [echo] Resolving Build Target for Cordovalib...[gettarget] Project Target:   AndroID 4.4.2[gettarget] API level:        19     [echo] ----------     [echo] Creating output directorIEs if needed...     [echo] ----------     [echo] Resolving DependencIEs for Cordovalib...[dependency] library dependencIEs:[dependency] No librarIEs[dependency] [dependency] -------------------code-gen:[mergemanifest] Found Deleted Target file[mergemanifest] Merging AndroIDManifest files into one.[mergemanifest] Manifest merger Disabled. Using project manifest only.     [echo] Handling aIDl files...     [aIDl] No AIDL files to compile.     [echo] ----------     [echo] Handling RenderScript files...     [echo] ----------     [echo] Handling Resources...     [aapt] Found modifIEd input file     [aapt] Generating resource IDs...     [echo] ----------     [echo] Handling BuildConfig class...[buildconfig] No need to generate new BuildConfig.-pre-compile:-compile:     [echo] Creating library output jar file...-post-compile:-obfuscate:-dex:     [echo] library project: do not convert bytecode...-crunch:   [crunch] Crunching PNG files in source dir: /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/res   [crunch] To destination dir: /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/ant-build/res   [crunch] Crunched 0 PNG files to update cache-package-resources:     [echo] library project: do not package resources...-package:     [echo] library project: do not package apk...-post-package:-do-deBUG:     [echo] library project: do not create apk...[propertyfile] Updating property file: /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/ant-build/build.prop[propertyfile] Updating property file: /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/ant-build/build.prop[propertyfile] Updating property file: /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/ant-build/build.prop[propertyfile] Updating property file:     /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/ant-build/build.prop    -post-build:    deBUG:    -code-gen:    [mergemanifest] Found Deleted Target file    [mergemanifest] Merging AndroIDManifest files into one.    [mergemanifest] Manifest merger Disabled. Using project manifest only.         [echo] Handling aIDl files...         [aIDl] No AIDL files to compile.         [echo] ----------         [echo] Handling RenderScript files...         [echo] ----------         [echo] Handling Resources...         [aapt] Found modifIEd input file         [aapt] Generating resource IDs...         [echo] ----------         [echo] Handling BuildConfig class...    [buildconfig] No need to generate new BuildConfig.    -pre-compile:         [echo] Set jars path to: /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/ant-build/classes.jar    -compile:        [javac] Compiling 2 source files to /Users/kristoffer/web/photoApp/platforms/androID/ant-build/classes    -post-compile:    -obfuscate:    -dex:          [dex] input: /Users/kristoffer/web/photoApp/platforms/androID/ant-build/classes          [dex] input: /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/ant-build/classes.jar          [dex] Using Pre-Dexed classes-d889c6bd0911025d0e9120cf57234197.jar <- /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/ant-build/classes.jar          [dex] Found modifIEd input file          [dex] Converting compiled files and external librarIEs into /Users/kristoffer/web/photoApp/platforms/androID/ant-build/classes.dex...           [dx] Merged dex A (14 defs/28.2KiB) with dex B (206 defs/314.1KiB). Result is 220 defs/415.6KiB. Took 0.3s    -crunch:       [crunch] Crunching PNG files in source dir: /Users/kristoffer/web/photoApp/platforms/androID/res       [crunch] To destination dir: /Users/kristoffer/web/photoApp/platforms/androID/ant-build/res       [crunch] Crunched 0 PNG files to update cache    -package-resources:         [aapt] Found modifIEd input file         [aapt] Creating full resource package...         [aapt]     (skipPing file '.bower.Json' due to ANDROID_AAPT_IGnorE pattern '.*')         [aapt]     (skipPing file '.bower.Json' due to ANDROID_AAPT_IGnorE pattern '.*')         [aapt]     (skipPing file '.bower.Json' due to ANDROID_AAPT_IGnorE pattern '.*')         [aapt]     (skipPing file '.bower.Json' due to ANDROID_AAPT_IGnorE pattern '.*')         [aapt]     (skipPing file '.bower.Json' due to ANDROID_AAPT_IGnorE pattern '.*')         [aapt] Warning: AndroIDManifest.xml already defines deBUGgable (in http://schemas.androID.com/apk/res/androID); using existing value in manifest.    -package:    [apkbuilder] Found modifIEd input file    [apkbuilder] Creating KvittoScanner-deBUG-unaligned.apk and signing it with a deBUG key...    -post-package:    -do-deBUG:     [zipalign] Running zip align on final apk...         [echo] DeBUG Package: /Users/kristoffer/web/photoApp/platforms/androID/ant-build/KvittoScanner-deBUG.apk    [propertyfile] Updating property file: /Users/kristoffer/web/photoApp/platforms/androID/ant-build/build.prop    [propertyfile] Updating property file: /Users/kristoffer/web/photoApp/platforms/androID/ant-build/build.prop    [propertyfile] Updating property file: /Users/kristoffer/web/photoApp/platforms/androID/ant-build/build.prop    [propertyfile] Updating property file: /Users/kristoffer/web/photoApp/platforms/androID/ant-build/build.prop    -post-build:         [move] Moving 1 file to /Users/kristoffer/web/photoApp/platforms/androID/ant-build         [move] Moving 1 file to /Users/kristoffer/web/photoApp/platforms/androID/Cordovalib/ant-build    deBUG:    BUILD SUCCESSFul    Total time: 5 seconds    WARNING : No target specifIEd,deploying to device '05f2fdad3444ea60'.    Using apk: /Users/kristoffer/web/photoApp/platforms/androID/ant-build/KvittoScanner-deBUG-unaligned.apk    Installing app on device...    Launching application...    LAUNCH SUCCESS

androID app中的index.HTML:

<!DOCTYPE HTML><HTML>  <head>    <Meta charset="utf-8">    <Meta name="vIEwport" content="initial-scale=1,maximum-scale=1,user-scalable=no,wIDth=device-wIDth">    <Title></Title>    <link href="lib/ionic/CSS/ionic.CSS" rel="stylesheet">    <link href="CSS/style.CSS" rel="stylesheet">    <!-- IF using Sass (run gulp sass first),then uncomment below and remove the CSS includes above    <link href="CSS/ionic.app.CSS" rel="stylesheet">    -->    <!-- ionic/angularJs Js -->    <script src="lib/ionic/Js/ionic.bundle.Js"></script>    <!-- ngCordova -->    <script src="lib/ng-cordova.min.Js"></script>    <!-- cordova script (this will be a 404 during development) -->    <script src="cordova.Js"></script>    <!-- your app's Js -->    <script src="Js/app.Js"></script>    <script src="Js/controllers.Js"></script>    <script src="Js/services.Js"></script>  </head>  <body ng-app="starter" animation="slIDe-left-right-ios7" >    <!--       The nav bar that will be updated as we navigate between vIEws.    -->    <ion-nav-bar >      <ion-nav-back-button >        Back      </ion-nav-back-button>    </ion-nav-bar>    <!--       The vIEws will be rendered in the <ion-nav-vIEw> directive below      Templates are in the /templates folder (but you Could also      have templates inline in this HTML file if you'd like).    -->    <ion-nav-vIEw></ion-nav-vIEw>  </body></HTML>
解决方法 键入离子信息并检查已安装的Cordova版本.如果你有v5.0.0现在需要一个新的插件,否则所有的http请求都被阻止.

最近,cordova发布了cordova-androID 4.0以及cordova cli的laster版本. cordova-androID中的更改默认情况下会阻止任何http请求.已经有一些关于这个问题的帖子.要解决这个问题,您只需添加cordova-whiteList-plugin即可.离子插件添加cordova-plugin-whiteList https://github.com/apache/cordova-plugin-whitelist
见参考:
https://forum.ionicframework.com/t/build-proccess-changed-and-now-cannot-call-to-api/25103

快乐的黑客:)

总结

以上是内存溢出为你收集整理的离子运行android似乎工作,但该应用程序没有在手机上启动,为什么?全部内容,希望文章能够帮你解决离子运行android似乎工作,但该应用程序没有在手机上启动,为什么?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1138207.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存