首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误警告:应该避免使用flatDirs,因为它不支持任何元数据格式。

错误警告:应该避免使用flatDirs,因为它不支持任何元数据格式。
EN

Stack Overflow用户
提问于 2021-09-03 16:56:10
回答 1查看 4.1K关注 0票数 0

我在Android上运行的Ionic/ with项目一直有问题。试图解决一个与新安装的节点,角钢,Ionic,Android工作室,新项目从Ionic (标签)。

我还是跑不开,我被困在上面两天了。我现在得到以下错误。

代码语言:javascript
运行
复制
npx cap run android  --stacktrace --info
√ Copying web assets from www to android\app\src\main\assets\public in 3.40s
√ Creating capacitor.config.json in android\app\src\main\assets in 3.15ms
√ copy android in 3.48s
√ Updating Android plugins in 10.59ms
[info] Found 4 Capacitor plugins for android:
       @capacitor/app@1.0.3
       @capacitor/haptics@1.0.3
       @capacitor/keyboard@1.0.3
       @capacitor/status-bar@1.0.3
√ update android in 148.19ms
× Running Gradle build - failed!
[error] WARNING:: Using flatDirs should be avoided because it doesn't support any meta-data formats.
        Currently detected usages:
        - repository flatDir used in: project ':capacitor-cordova-android-plugins'
        WARNING:: Please remove usages of `jcenter()` Maven repository from your build scripts and   
        migrate your build to other Maven repositories.
        This repository is deprecated and it will be shut down in the future.
        See http://developer.android.com/r/tools/jcenter-end-of-service for more information.        
        Currently detected usages in: project ':capacitor-android', project ':capacitor-app', project        ':capacitor-cordova-android-plugins', ...
        Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns    
        http://schemas.android.com/repository/android/common/01
        Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns   
        http://schemas.android.com/repository/android/generic/01
        Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns      
        http://schemas.android.com/sdk/android/repo/addon2/01
        Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns 
        http://schemas.android.com/sdk/android/repo/repository2/01
        Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns    
        http://schemas.android.com/sdk/android/repo/sys-img2/01
        > Task :app:preBuild UP-TO-DATE
        > Task :app:preDebugBuild UP-TO-DATE
        > Task :capacitor-android:preBuild UP-TO-DATE
        > Task :capacitor-android:preDebugBuild UP-TO-DATE
        > Task :capacitor-android:compileDebugAidl NO-SOURCE
        > Task :capacitor-app:preBuild UP-TO-DATE
        > Task :capacitor-app:preDebugBuild UP-TO-DATE
        > Task :capacitor-app:compileDebugAidl NO-SOURCE
        > Task :capacitor-cordova-android-plugins:preBuild UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:preDebugBuild UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:compileDebugAidl NO-SOURCE
        > Task :capacitor-haptics:preBuild UP-TO-DATE
        > Task :capacitor-haptics:preDebugBuild UP-TO-DATE
        > Task :capacitor-haptics:compileDebugAidl NO-SOURCE
        > Task :capacitor-keyboard:preBuild UP-TO-DATE
        > Task :capacitor-keyboard:preDebugBuild UP-TO-DATE
        > Task :capacitor-keyboard:compileDebugAidl NO-SOURCE
        > Task :capacitor-status-bar:preBuild UP-TO-DATE
        > Task :capacitor-status-bar:preDebugBuild UP-TO-DATE
        > Task :capacitor-status-bar:compileDebugAidl NO-SOURCE
        > Task :app:compileDebugAidl NO-SOURCE
        > Task :capacitor-android:packageDebugRenderscript NO-SOURCE
        > Task :capacitor-app:packageDebugRenderscript NO-SOURCE
        > Task :capacitor-cordova-android-plugins:packageDebugRenderscript NO-SOURCE
        > Task :capacitor-haptics:packageDebugRenderscript NO-SOURCE
        > Task :capacitor-keyboard:packageDebugRenderscript NO-SOURCE
        > Task :capacitor-status-bar:packageDebugRenderscript NO-SOURCE
        > Task :app:compileDebugRenderscript NO-SOURCE
        > Task :app:generateDebugBuildConfig UP-TO-DATE
        > Task :app:javaPreCompileDebug UP-TO-DATE
        > Task :capacitor-android:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-app:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-haptics:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-keyboard:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-status-bar:writeDebugAarMetadata UP-TO-DATE
        > Task :app:generateDebugResValues UP-TO-DATE
        > Task :app:generateDebugResources UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:writeDebugAarMetadata
        > Task :app:processDebugGoogleServices FAILED

        Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.  
        Use '--warning-mode all' to show the individual deprecation warnings.
        See
        https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings  
        10 actionable tasks: 2 executed, 8 up-to-date

        FAILURE: Build failed with an exception.

        * What went wrong:
        Execution failed for task ':app:processDebugGoogleServices'.
        > No matching client found for package name 'io.ionic.starter'

        * Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get        more log output. Run with --scan to get full insights.

        * Get more help at https://help.gradle.org

        BUILD FAILED in 3s

我能看到的问题是它所引用的电容-cordova-android文件夹正在每次构建中重建,尽管根build.gradle和app build.gradle已经做了错误中列出的更改。用这个把我的头发拔出来。

帮助感激!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-09-09 09:18:39

我目前正在做一个离子/角度项目,我和你犯了同样的错误。我所做的:

  1. 关闭安卓工作室。
  2. 删除安卓和ios文件夹,我的项目
  3. 做出了一个构建安卓工作室
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69048376

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档