• <bdo id='Uvqyw'></bdo><ul id='Uvqyw'></ul>

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

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

      <legend id='Uvqyw'><style id='Uvqyw'><dir id='Uvqyw'><q id='Uvqyw'></q></dir></style></legend>
      1. 谷歌 6 月 17 日 Firebase SDK 更新后,Ionic Cordova 应用程序停止编译

        时间:2024-04-14
        • <bdo id='lRh6V'></bdo><ul id='lRh6V'></ul>
            <legend id='lRh6V'><style id='lRh6V'><dir id='lRh6V'><q id='lRh6V'></q></dir></style></legend>
            <i id='lRh6V'><tr id='lRh6V'><dt id='lRh6V'><q id='lRh6V'><span id='lRh6V'><b id='lRh6V'><form id='lRh6V'><ins id='lRh6V'></ins><ul id='lRh6V'></ul><sub id='lRh6V'></sub></form><legend id='lRh6V'></legend><bdo id='lRh6V'><pre id='lRh6V'><center id='lRh6V'></center></pre></bdo></b><th id='lRh6V'></th></span></q></dt></tr></i><div id='lRh6V'><tfoot id='lRh6V'></tfoot><dl id='lRh6V'><fieldset id='lRh6V'></fieldset></dl></div>

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

              <tfoot id='lRh6V'></tfoot>

                    <tbody id='lRh6V'></tbody>
                  本文介绍了谷歌 6 月 17 日 Firebase SDK 更新后,Ionic Cordova 应用程序停止编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 Firebase 主要版本更新后,我无法编译 Ionic Cordova 应用程序并进行重大更改,特别是 2019 年 6 月 17 日的更新.

                  I'm unable to compile Ionic Cordova App after Firebase Major version update with Breaking Changes, specifically with June 17, 2019 update.

                  我尝试降级到 Android Cordova 6.3.0,但我的项目必须是 7.0.0.

                  I tried downgrading to Android Cordova 6.3.0 but my project must be 7.0.0.

                  这是我的离子信息:

                  @ionic/cli-utils  : 1.19.2
                      ionic (Ionic CLI) : 3.20.0
                  
                  global packages:
                  
                      cordova (Cordova CLI) : 8.0.0
                  
                  local packages:
                  
                      @ionic/app-scripts : 3.2.1
                      Cordova Platforms  : android 7.0.0 browser 5.0.4
                      Ionic Framework    : ionic-angular 3.9.3
                  
                  System:
                  
                      Android SDK Tools : 26.1.1
                      Node              : v8.9.1
                      npm               : 5.5.1
                      OS                : Windows 10
                  
                  Environment Variables:
                  
                      ANDROID_HOME : C:Developmentandroid-sdk
                  
                  Misc:
                  
                      backend : pro
                  

                  这是我遇到的错误:

                  :app:processDebugResourcesC:Usersmmzep.gradlecaches ransforms-1files-1.1core-1.0.0.aar73b4a83ab5e76f20c84a66b1c8444d08 esvaluesvalues.xml:133:5-70: AAPT: 错误: 资源 android:找不到 attr/fontVariationSettings.

                  :app:processDebugResources C:Usersmmzep.gradlecaches ransforms-1files-1.1core-1.0.0.aar73b4a83ab5e76f20c84a66b1c8444d08 esvaluesvalues.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

                  C:Usersmmzep.gradlecaches ransforms-1files-1.1core-1.0.0.aar73b4a83ab5e76f20c84a66b1c8444d08 esvaluesvalues.xml:133:5-70:AAPT:错误:资源 android:attr/ttcIndex 未找到.

                  C:Usersmmzep.gradlecaches ransforms-1files-1.1core-1.0.0.aar73b4a83ab5e76f20c84a66b1c8444d08 esvaluesvalues.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.

                  C:UsersmmzepDesktopmarioSevenSevenPassengerAppplatformsandroidappuildintermediatesincrementalmergeDebugResourcesmerged.dirvaluesvalues.xml:95:错误:找不到资源 android:attr/fontVariationSettings.C:UsersmmzepDesktopmarioSevenSevenPassengerAppplatformsandroidappuildintermediatesincrementalmergeDebugResourcesmerged.dirvaluesvalues.xml:95:错误:找不到资源 android:attr/ttcIndex.错误:链接失败参考文献.

                  C:UsersmmzepDesktopmarioSevenSevenPassengerAppplatformsandroidappuildintermediatesincrementalmergeDebugResourcesmerged.dirvaluesvalues.xml:95: error: resource android:attr/fontVariationSettings not found. C:UsersmmzepDesktopmarioSevenSevenPassengerAppplatformsandroidappuildintermediatesincrementalmergeDebugResourcesmerged.dirvaluesvalues.xml:95: error: resource android:attr/ttcIndex not found. error: failed linking references.

                  执行 aapt 失败

                  com.android.ide.common.process.ProcessException:执行失败适配

                  com.android.ide.common.process.ProcessException: Failed to execute aapt

                  推荐答案

                  此构建失败是由于 Google Play 服务和 Firebase 库的主要版本发布,于 6 月 17 日发布.

                  This build failure is due to a major version release of the Google Play Services and Firebase libaries on June 17.

                  新的库版本有以下要求:

                  The new library versions have the following requirements:

                  • com.android.tools.build:gradle 升级到 v3.2.1 或更高版本.
                  • compileSdkVersion 升级到 28 或更高版本.
                  • 更新您的应用以使用 Jetpack (AndroidX)
                  • Upgrade com.android.tools.build:gradle to v3.2.1 or later.
                  • Upgrade compileSdkVersion to 28 or later.
                  • Update your app to use Jetpack (AndroidX)

                  前两个要求可以通过更新为使用 cordova-android@8.0.0 来解决.

                  The first two requirements can be resolved by updating to use cordova-android@8.0.0.

                  第三个要求您的 Android 项目迁移到使用 AndroidX (Jetpack).AndroidX 是广泛使用的 Android 支持库.AndroidX 现在被最新版本的 Play Services/Firebase 库使用,而 Support 库被许多现有插件使用,例如 cordova-plugin-firebase.这两个库不能同时存在于同一个 Android 构建中 - 这样做会导致构建失败.

                  The third requires that your Android project migrates to using AndroidX (Jetpack). AndroidX is the successor to the widely-used Android Support Library. AndroidX now used by the latest versions of Play Services/Firebase libraries and the Support library is used by many existing plugins such as cordova-plugin-firebase. The two libraries cannot live side-by-side in the same Android build - doing so will lead to build failure.

                  要解决此问题,请在您的 Cordova 项目中添加以下两个插件:

                  To resolve this issue, add the following two plugins your Cordova project:

                  • cordova-plugin-androidx 在 Android 项目中启用 AndroidX.
                  • cordova-plugin-androidx-adapter 动态修补源码任何使用支持库以使用 AndroidX 等效项的插件.
                  • cordova-plugin-androidx to enable AndroidX in the Android project.
                  • cordova-plugin-androidx-adapter to dynamically patch the source code of any plugins using the Support Library to use the AndroidX equivalents.

                  有关如何在测试项目中试用此功能的工作示例,请参阅 我对这个 Github 问题的评论.

                  For a working example of how to try this out in a test project, see my comment on this Github issue.

                  注意:如果您使用的是 cordova-plugin-firebase 并遇到错误,您可以改用 my fork of that plugin 发布为cordova-plugin-firebasex 并已修复以解决新 Firebase SDK 引起的问题:

                  Note: if you are using cordova-plugin-firebase and encountering errors, you can instead use my fork of that plugin which is published as cordova-plugin-firebasex and is fixed to resolve issues caused by the new Firebase SDK:

                  rm -Rf platforms/android
                  cordova plugin rm cordova-plugin-firebase
                  rm -Rf plugins/ node_modules/
                  npm install
                  cordova plugin add cordova-plugin-firebasex
                  cordova platform add android
                  

                  这篇关于谷歌 6 月 17 日 Firebase SDK 更新后,Ionic Cordova 应用程序停止编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何将 NSData 编码为 base64?(iPhone/iPad) 下一篇:让 Ionic 应用出现在“分享"中列出和接收数据

                  相关文章

                    • <bdo id='sjm1y'></bdo><ul id='sjm1y'></ul>

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

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