• <legend id='yx94o'><style id='yx94o'><dir id='yx94o'><q id='yx94o'></q></dir></style></legend>

      <small id='yx94o'></small><noframes id='yx94o'>

      • <bdo id='yx94o'></bdo><ul id='yx94o'></ul>
      <i id='yx94o'><tr id='yx94o'><dt id='yx94o'><q id='yx94o'><span id='yx94o'><b id='yx94o'><form id='yx94o'><ins id='yx94o'></ins><ul id='yx94o'></ul><sub id='yx94o'></sub></form><legend id='yx94o'></legend><bdo id='yx94o'><pre id='yx94o'><center id='yx94o'></center></pre></bdo></b><th id='yx94o'></th></span></q></dt></tr></i><div id='yx94o'><tfoot id='yx94o'></tfoot><dl id='yx94o'><fieldset id='yx94o'></fieldset></dl></div>
      1. <tfoot id='yx94o'></tfoot>

        Ionic 3:安装cordova-plugin-camera和Native Web-intent后Android添加平

        Ionic 3 : Android add platform fails after installing cordova-plugin-camera and Native Web-intent(Ionic 3:安装cordova-plugin-camera和Native Web-intent后Android添加平台失败)
          <tbody id='dLNfN'></tbody>
        <legend id='dLNfN'><style id='dLNfN'><dir id='dLNfN'><q id='dLNfN'></q></dir></style></legend>

        <small id='dLNfN'></small><noframes id='dLNfN'>

            <tfoot id='dLNfN'></tfoot>
            • <bdo id='dLNfN'></bdo><ul id='dLNfN'></ul>

                  <i id='dLNfN'><tr id='dLNfN'><dt id='dLNfN'><q id='dLNfN'><span id='dLNfN'><b id='dLNfN'><form id='dLNfN'><ins id='dLNfN'></ins><ul id='dLNfN'></ul><sub id='dLNfN'></sub></form><legend id='dLNfN'></legend><bdo id='dLNfN'><pre id='dLNfN'><center id='dLNfN'></center></pre></bdo></b><th id='dLNfN'></th></span></q></dt></tr></i><div id='dLNfN'><tfoot id='dLNfN'></tfoot><dl id='dLNfN'><fieldset id='dLNfN'></fieldset></dl></div>
                  本文介绍了Ionic 3:安装cordova-plugin-camera和Native Web-intent后Android添加平台失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  首先,感谢您花时间帮助我!

                  And first of all, thank you for the time you'll take to help me!

                  总结:

                  尝试将 cordova-plugin-camera 添加到我的 ionic 3 项目中.在多次失败并最终成功之后,现在我的应用不再基于我的 android 构建了.

                  Tried to add the cordova-plugin-camera to my ionic 3 project. After many fails and finally a success, now my app does not build on my android anymore.

                  -------- 开始编辑--------

                  -------- START EDIT --------

                  经过多次测试,当我同时安装插件相机和网络意图时,似乎存在冲突/问题.

                  After much tests, it seems that there is a conflict/issue when I have both plugins camera and web-intent installed.

                  这两个插件都来自 Ionic Native:

                  Both plugins are from Ionic Native:

                  • 相机插件:cordova-plugin-camera
                  • web-intent : com-darryncampbell-cordova-plugin-intent
                  • camera plugin : cordova-plugin-camera
                  • web-intent : com-darryncampbell-cordova-plugin-intent

                  -------- 结束编辑--------

                  -------- END EDIT --------

                  我的离子信息

                      cli packages: (C:Users[...]AppDataRoaming
                  pm
                  ode_modules)
                          @ionic/cli-utils  : 1.9.2
                          ionic (Ionic CLI) : 3.9.2
                      global packages:
                          Cordova CLI : 7.0.1
                      local packages:
                          @ionic/app-scripts : 2.1.3
                          Cordova Platforms  : android 6.2.3
                          Ionic Framework    : ionic-angular 3.6.0
                      System:
                          Node : v8.1.2
                          npm  : 5.0.3
                          OS   : Windows 10
                  

                  我采取的步骤(一点历史):

                  由于 cordova-plugin-compat 版本不兼容(可在许多论坛中找到),我无法安装相机插件.所以我遵循了一些步骤:

                  I could not install the camera plugin due to an incompatible version of the cordova-plugin-compat (can be found in lots of forums). So I've followed some of the steps:

                  • 删除了 cordova-plugin-compat v1.0.0 --force
                  • 安装了最新版本的 cordova-plugin-compat@1.1.0
                  • --> run android : 我的应用程序仍然可以在我的设备上运行(检查!)

                  然后我尝试安装相机插件:

                  Then I try to install the camera plugin :

                  • ionic cordova 插件添加 cordova-plugin-camera
                  • 这是我得到的结果:

                  • ionic cordova plugin add cordova-plugin-camera
                  • Here is what I got back:

                  > cordova plugin add cordova-plugin-camera --save
                  × Running command - failed!
                  [ERROR] An error occurred while running cordova plugin add cordova-plugin-camera --save (exit code 1):
                  Installing "cordova-plugin-camera" for android
                  Plugin dependency "cordova-plugin-compat@1.1.0" already fetched, using that version.
                  Dependent plugin "cordova-plugin-compat" already installed on android.
                  [...]
                  BUILD SUCCESSFUL
                  Error during processing of action! Attempting to revert...
                  Failed to install 'cordova-plugin-camera': Error
                       at copyNewFile
                  (C:[...]platformsandroidcordovalibpluginHandlers.js:248:15)
                       at install (C:[...]platformsandroidcordovalibpluginHandlers.js:43:17)
                       at ActionStack.process
                  (C:[...]platformsandroidcordova
                  ode_modulescordova-commonsrcActionStack.js:56:25)
                       at PluginManager.doOperation
                  (C:[...]platformsandroidcordova
                  ode_modulescordova-commonsrcPluginManager.js:117:20)
                       at PluginManager.addPlugin
                  (C:[...]platformsandroidcordova
                  ode_modulescordova-commonsrcPluginManager.js:147:17)
                       at C:[...]platformsandroidcordovaApi.js:254:18
                       at _fulfilled
                  (C:[...]platformsandroidcordova
                  ode_modulesqq.js:854:54)
                       at self.promiseDispatch.done
                  (C:[...]platformsandroidcordova
                  ode_modulesqq.js:883:30)
                       at Promise.promise.promiseDispatch
                  (C:[...]platformsandroidcordova
                  ode_modulesqq.js:816:13)
                       at C:[...]platformsandroidcordova
                  ode_modulesqq.js:624:44
                  Error: Uh oh!
                  "C:[...]platformsandroid
                  esxmlprovider_paths.xml" already exists!
                  

                  然后,我继续按照我在其他线程中看到的有关相机插件问题的步骤:

                  So then, I continued following steps I've seen in other threads about the camera plugin issue:

                  • 移除安卓平台
                  • ionic cordova 插件添加 cordova-plugin-camera
                  • --> 插件安装成功!(我认为,太棒了!)

                  所以我重新添加了平台:

                  So I add back the platform :

                  • ionic cordova 平台添加android
                  • 和繁荣:

                  • ionic cordova platform add android
                  • and BOOM:

                  > cordova platform add android --save
                  × Running command - failed!
                  [ERROR] Exception: Using cordova-fetch for cordova-android@~6.2.2
                  Adding android project...
                  Creating Cordova project for the Android platform:
                          Path: platformsandroid
                          Package: com.app.app
                          Name: app
                          Activity: MainActivity
                          Android target: android-25
                  Subproject Path: CordovaLib
                  
                  Android project created with cordova-android@6.2.3
                  
                  Installing "com-darryncampbell-cordova-plugin-intent" for android
                  Subproject Path: CordovaLib
                  Installing "cordova-plugin-camera" for android
                  Plugin dependency "cordova-plugin-compat@1.1.0" already fetched, using that version.
                  Installing "cordova-plugin-compat" for android
                  Error during processing of action! Attempting to revert...
                  Failed to install 'cordova-plugin-camera': Error
                       at copyNewFile
                  (C:[...]platformsandroidcordovalibpluginHandlers.js:248:15)
                       at install (C:[...]platformsandroidcordovalibpluginHandlers.js:43:17)
                       at ActionStack.process
                  (C:[...]platformsandroidcordova
                  ode_modulescordova-commonsrcActionStack.js:56:25)
                       at PluginManager.doOperation
                  (C:[...]platformsandroidcordova
                  ode_modulescordova-commonsrcPluginManager.js:117:20)
                       at PluginManager.addPlugin
                  (C:[...]platformsandroidcordova
                  ode_modulescordova-commonsrcPluginManager.js:147:17)
                       at C:[...]platformsandroidcordovaApi.js:254:18
                       at _fulfilled
                  (C:[...]platformsandroidcordova
                  ode_modulesqq.js:854:54)
                       at self.promiseDispatch.done
                  (C:[...]platformsandroidcordova
                  ode_modulesqq.js:883:30)
                       at Promise.promise.promiseDispatch
                  (C:[...]platformsandroidcordova
                  ode_modulesqq.js:816:13)
                       at C:[...]platformsandroidcordova
                  ode_modulesqq.js:570:49
                  Error: Uh oh!
                  "C:[...]platformsandroid
                  esxmlprovider_paths.xml" already exists!
                  

                  最后一步,我已经运行 npm install -g cordova ionic

                  Final step, I've run npm install -g cordova ionic

                      npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
                      C:Users[...]AppDataRoaming
                  pmionic -> C:Users[...]AppDataRoaming
                  pm
                  ode_modulesionicinionic
                      C:Users[...]AppDataRoaming
                  pmcordova -> C:Users[...]AppDataRoaming
                  pm
                  ode_modulescordovaincordova
                      + ionic@3.9.2
                      + cordova@7.0.1
                      added 5 packages, removed 6 packages and updated 42 packages in 55.193s
                  

                  ionic cordova platform add android 再次,但现在它告诉我:

                  and ionic cordova platform add android again, but now it tells me:

                      > cordova platform add android --save
                      × Running command - failed!
                      [WARN] Platform already added. Saving platforms to config.xml.
                      > cordova platform save
                      √ Running command - done!
                  

                  如果我尝试 ionic cordova run android:

                      > cordova platform add android --save
                      × Running command - failed!
                      [WARN] Platform already added. Saving platforms to config.xml.
                      > cordova platform save
                      √ Running command - done!
                      [INFO] Running app-scripts build: --platform android --target cordova
                      [...]
                      > ionic cordova prepare
                      [WARN] No Cordova platforms listed in config.xml. Nothing to prepare.
                  
                      You can save your installed platforms to config.xml with the ionic cordova platform save command.
                  

                  ionic cordova platform save 命令不会改变任何事情.

                  and ionic cordova platform save command doesn't change a thing.

                  -------- 开始编辑 --------然后我尝试创建一个全新的项目并一一添加插件,从相机开始,并在安装每个插件后在我的设备上重建/运行......一切都很好,直到最后一个,这是网络-intent 插件,我遇到了和以前一样的问题:

                  -------- START EDIT -------- Then I tried creating a brand new project and added the plugins one by one, starting with the camera one, and rebuilding/running on my device after every plug in installed... it all worked fine until the last one, which was the web-intent plug-in and I got the same issue as before :

                      Error: Uh oh!
                              "C:[...]
                  ewAppplatformsandroid
                  esxmlprovider_paths.xml" already exists!
                  

                  卸载它,删除并重新添加平台,然后在设备上构建、编译和运行再次工作.

                  Uninstalled it, removed and re added the platform and build, compile and run on device workes again.

                  -------- 结束编辑--------

                  -------- END EDIT --------

                  这是我拥有的所有插件的列表:

                  Here is the list of all the plugins I have:

                      com-darryncampbell-cordova-plugin-intent 0.0.14 "Intent Shim"
                      cordova-plugin-camera 2.4.1 "Camera"
                      cordova-plugin-compat 1.1.0 "Compat"
                      cordova-plugin-console 1.0.5 "Console"
                      cordova-plugin-device 1.1.4 "Device"
                      cordova-plugin-facebook4 1.9.1 "Facebook Connect"
                      cordova-plugin-file 4.3.3 "File"
                      cordova-plugin-file-transfer 1.6.3 "File Transfer"
                      cordova-plugin-photo-library 2.1.0 "Photo Library"
                      cordova-plugin-splashscreen 4.0.3 "Splashscreen"
                      cordova-plugin-2.2.2 "StatusBar"
                      cordova-plugin-whitelist 1.3.1 "Whitelist"
                      cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
                      ionic-plugin-keyboard 2.2.1 "Keyboard"
                  

                  不确定我是否需要降级 Ionic 或 Cordova CLI、Ionic 或 Cordova 平台或其他任何东西才能使其正常工作.

                  Not sure if I need to downgrade Ionic or Cordova CLI, Ionic or cordova platform or anything else to make this work.

                  再次感谢您的帮助!

                  推荐答案

                  在ionic3中不需要添加平台

                  in ionic3 you don't need to add platform

                  你只需运行 ionic cordova run android 它会自动添加它

                  you just run ionic cordova run android it automaticaly addeds it

                  这也是错误的命令,据我所知,他们不是这样的命令

                  also this is wrong command their is no such command as far as i know

                  cordova platform add android --save // wrong command
                  

                  对的一个

                  ionic cordova run android // right command directly add platform and run 
                  

                  这篇关于Ionic 3:安装cordova-plugin-camera和Native Web-intent后Android添加平台失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)
                  SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)
                  Android file copy(安卓文件拷贝)
                  Android how to detect Copy event of Edittext in android(Android如何在android中检测Edittext的Copy事件)
                  Android copy image from gallery folder onto SD Card alternative folder(Android将图像从图库文件夹复制到SD卡替代文件夹)
                  Is there a tool to find unused resources in an Android project?(是否有工具可以在 Android 项目中查找未使用的资源?)
                  • <bdo id='6mcQ2'></bdo><ul id='6mcQ2'></ul>

                      <tbody id='6mcQ2'></tbody>
                    <i id='6mcQ2'><tr id='6mcQ2'><dt id='6mcQ2'><q id='6mcQ2'><span id='6mcQ2'><b id='6mcQ2'><form id='6mcQ2'><ins id='6mcQ2'></ins><ul id='6mcQ2'></ul><sub id='6mcQ2'></sub></form><legend id='6mcQ2'></legend><bdo id='6mcQ2'><pre id='6mcQ2'><center id='6mcQ2'></center></pre></bdo></b><th id='6mcQ2'></th></span></q></dt></tr></i><div id='6mcQ2'><tfoot id='6mcQ2'></tfoot><dl id='6mcQ2'><fieldset id='6mcQ2'></fieldset></dl></div>
                      <legend id='6mcQ2'><style id='6mcQ2'><dir id='6mcQ2'><q id='6mcQ2'></q></dir></style></legend><tfoot id='6mcQ2'></tfoot>

                      1. <small id='6mcQ2'></small><noframes id='6mcQ2'>