Parsing Data for android-21 failed

本文介绍了解决Eclipse导入项目时报错“ParsingDataforandroid-21failed”的方法。该问题源于项目的targetSDK版本(21,即Android 5.0)与计算机上安装的Java版本(1.6)不兼容。文章推荐升级到Java 7或更高版本,并建议考虑使用Android Studio以避免类似的版本兼容问题。

问题描述

eclipse导入项目报错 Parsing Data for android-21 failed

解决办法

因为加载的项目target sdk 为 21 android 5.0,eclipse要使用5.0及以后sdk至少需要java7,而对应电脑安装的java版本为1.6,安装jdk7后load sdk 没有问题。

建议使用android studio,虽然也有不少坑,无论用啥工具,有一点必须注意就是jdk版本,sdk版本,adt版本,build tool版本,各种tools版本都彼此有对应要求。

AndroidCatalogsConventionPlugin-WanLanModularPlatform:parsing maven_dependency.json AndroidCatalogsConventionPlugin-WanLanModularPlatform:parsing configureModuleMaven [file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/WanLanModularPlatform_Android/CoreModularPlatform_Android/maven/releases/, file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/WanLanModularPlatform_Android/CoreModularPlatform_Android/maven/snapshots, file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/CoreModularPlatform_Android/maven/releases/, file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/CoreModularPlatform_Android/maven/snapshots] AndroidSubstituteConventionPlugin-WanLanModularPlatform:parsing module_dependency.json AndroidSubstituteConventionPlugin-WanLanModularPlatform:none module need module-src debug AndroidSubstituteConventionPlugin-MERCUSYS_Android:includeBuild for module-src debug, subsititute project :data:qos:dpi in HomeShieldModularPlatform_Android(F:\Mercusys_ADA\MERCUSYS_ANDROID\HomeShieldModularPlatform_Android) AndroidSubstituteConventionPlugin-MERCUSYS_Android:includeBuild for module-src debug, subsititute project :feature:qos:dpi in HomeShieldModularPlatform_Android(F:\Mercusys_ADA\MERCUSYS_ANDROID\HomeShieldModularPlatform_Android) AndroidSubstituteConventionPlugin-MERCUSYS_Android:includeBuild for module-src debug, subsititute project :data:client in HomeShieldModularPlatform_Android(F:\Mercusys_ADA\MERCUSYS_ANDROID\HomeShieldModularPlatform_Android) AndroidCatalogsConventionPlugin-HomeShieldModularPlatform:parsing maven_dependency.json AndroidCatalogsConventionPlugin-HomeShieldModularPlatform:parsing configureModuleMaven [file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/HomeShieldModularPlatform_Android/CoreModularPlatform_Android/maven/releases, file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/HomeShieldModularPlatform_Android/CoreModularPlatform_Android/maven/snapshots, file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/CoreModularPlatform_Android/maven/releases/, file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/CoreModularPlatform_Android/maven/snapshots] AndroidSubstituteConventionPlugin-HomeShieldModularPlatform:parsing module_dependency.json AndroidSubstituteConventionPlugin-HomeShieldModularPlatform:none module need module-src debug AndroidSubstituteConventionPlugin-MERCUSYS_Android:includeBuild for module-src debug, subsititute project :data:accessibility in AccountModularPlatform_Android(F:\Mercusys_ADA\MERCUSYS_ANDROID\AccountModularPlatform_Android) AndroidSubstituteConventionPlugin-MERCUSYS_Android:includeBuild for module-src debug, subsititute project :feature:accessibility in AccountModularPlatform_Android(F:\Mercusys_ADA\MERCUSYS_ANDROID\AccountModularPlatform_Android) AndroidCatalogsConventionPlugin-AccountModularPlatform:parsing maven_dependency.json AndroidCatalogsConventionPlugin-AccountModularPlatform:parsing configureModuleMaven [file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/AccountModularPlatform_Android/CoreModularPlatform_Android/maven/releases/, file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/AccountModularPlatform_Android/CoreModularPlatform_Android/maven/snapshots, file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/CoreModularPlatform_Android/maven/releases/, file:/F:/Mercusys_ADA/MERCUSYS_ANDROID/CoreModularPlatform_Android/maven/snapshots] AndroidSubstituteConventionPlugin-AccountModularPlatform:parsing module_dependency.json AndroidSubstituteConventionPlugin-AccountModularPlatform:none module need module-src debug > Configure project :app Init ARouterGradlePlugin gradle.startParameter taskName=clean gradle.startParameter taskName=clean gradle.startParameter taskName=clean gradle.startParameter taskName=clean gradle.startParameter taskName=clean gradle.startParameter taskName=clean FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':libmatterapi'. > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. > Namespace not specified. Specify a namespace in the module's build file: F:\Mercusys_ADA\MERCUSYS_ANDROID\Tapo_Android\libmatterapi\build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace. If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant. * 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. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 1s 错误分析
最新发布
09-29
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值