Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/203.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
错误:-Android资源链接失败,如何修复此问题?_Android_Android Studio - Fatal编程技术网

错误:-Android资源链接失败,如何修复此问题?

错误:-Android资源链接失败,如何修复此问题?,android,android-studio,Android,Android Studio,当我构建应用程序时,我遇到了这个错误。如何解决这个问题 Android resource linking failed C:\Users\Dasun Tharanga\.gradle\caches\transforms-2\files-2.1\e51dea7aad9fc20032a5d423af4d220f\res\layout\preference_widget_seekbar.xml:27: warn: generated id 'android:id/icon' for external

当我构建应用程序时,我遇到了这个错误。如何解决这个问题

Android resource linking failed
C:\Users\Dasun Tharanga\.gradle\caches\transforms-2\files-2.1\e51dea7aad9fc20032a5d423af4d220f\res\layout\preference_widget_seekbar.xml:27: warn: generated id 'android:id/icon' for external package 'android'.
C:\Users\Dasun Tharanga\.gradle\caches\transforms-2\files-2.1\e51dea7aad9fc20032a5d423af4d220f\res\layout\preference_widget_seekbar.xml:53: warn: generated id 'android:id/summary' for external package 'android'.
C:\Users\Dasun Tharanga\.gradle\caches\transforms-2\files-2.1\e51dea7aad9fc20032a5d423af4d220f\res\layout\preference_widget_seekbar.xml:45: warn: generated id 'android:id/title' for external package 'android'.
warn: removing resource com.slstudio.ecommerce:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value.
D:\Android\Codecanyon\codecanyon-20952416-android-ecommerce-universal-android-ecommerce-store-full-mobile-app-with-laravel-cms\Android App Source Code\ecommerce\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2787: error: style attribute 'attr/colorError (aka com.slstudio.ecommerce:attr/colorError)' not found.
error: failed linking references.

这是SDK版本26中的错误

在app build.gradle中更新SDK版本

compileSdkVersion 29
buildToolsVersion "29.0.0"

这是SDK版本26中的错误

在app build.gradle中更新SDK版本

compileSdkVersion 29
buildToolsVersion "29.0.0"

在无效缓存/重新启动后,我出现了此错误

大宗报价 Android资源链接失败 警告:删除资源com.slstudio.ecommerce:string/com\u facebook\u loginview\u logged\u in\u使用\u facebook\u f1gender,无需默认值。 \?\D:\Android\Codecanyon\Codecanyon-20952416-Android-ecommerce-universal-Android-ecommerce-store-full-mobile-app-with-laravel-cms\Android-app-Source-Code\ecommerce\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28\values-v28.xml:error:resource-Android:attr/dialogy。 \?\D:\Android\Codecanyon\Codecanyon-20952416-Android-ecommerce-universal-Android-ecommerce-store-full-mobile-app-with-laravel-cms\Android-app-Source-Code\ecommerce\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28\values-v28.xml:11:错误:资源Android:attr/dialogy未找到。 D:\Android\Codecanyon\Codecanyon-20952416-Android-ecommerce-universal-Android-ecommerce-store-full-mobile-app-with-laravel-cms\Android-app-Source-Code\ecommerce\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:5101:错误:未找到资源Android:attr/fontVariationSettings。 D:\Android\Codecanyon\Codecanyon-20952416-Android-ecommerce-universal-Android-ecommerce-store-full-mobile-app-with-laravel-cms\Android-app-Source-Code\ecommerce\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:5102:错误:未找到资源Android:attr/ttcIndex。 错误:链接引用失败。 大宗报价


在无效缓存/重新启动后,我出现了此错误

大宗报价 Android资源链接失败 警告:删除资源com.slstudio.ecommerce:string/com\u facebook\u loginview\u logged\u in\u使用\u facebook\u f1gender,无需默认值。 \?\D:\Android\Codecanyon\Codecanyon-20952416-Android-ecommerce-universal-Android-ecommerce-store-full-mobile-app-with-laravel-cms\Android-app-Source-Code\ecommerce\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28\values-v28.xml:error:resource-Android:attr/dialogy。 \?\D:\Android\Codecanyon\Codecanyon-20952416-Android-ecommerce-universal-Android-ecommerce-store-full-mobile-app-with-laravel-cms\Android-app-Source-Code\ecommerce\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28\values-v28.xml:11:错误:资源Android:attr/dialogy未找到。 D:\Android\Codecanyon\Codecanyon-20952416-Android-ecommerce-universal-Android-ecommerce-store-full-mobile-app-with-laravel-cms\Android-app-Source-Code\ecommerce\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:5101:错误:未找到资源Android:attr/fontVariationSettings。 D:\Android\Codecanyon\Codecanyon-20952416-Android-ecommerce-universal-Android-ecommerce-store-full-mobile-app-with-laravel-cms\Android-app-Source-Code\ecommerce\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:5102:错误:未找到资源Android:attr/ttcIndex。 错误:链接引用失败。 大宗报价


在您的从属关系中尝试:

configurations.all {
    resolutionStrategy.force 'androidx.vectordrawable:vectordrawable:1.0.1'
    resolutionStrategy.force 'androidx.documentfile:documentfile:1.0.0'
    resolutionStrategy.force 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
    resolutionStrategy.force 'androidx.fragment:fragment-animated:1.1.0-alpha04'
    resolutionStrategy.force 'androidx.appcompat:appcompat:1.1.0-alpha02'
}

在您的从属关系中尝试:

configurations.all {
    resolutionStrategy.force 'androidx.vectordrawable:vectordrawable:1.0.1'
    resolutionStrategy.force 'androidx.documentfile:documentfile:1.0.0'
    resolutionStrategy.force 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
    resolutionStrategy.force 'androidx.fragment:fragment-animated:1.1.0-alpha04'
    resolutionStrategy.force 'androidx.appcompat:appcompat:1.1.0-alpha02'
}

我通过执行以下操作修复了此问题:

  • 转到资产/AndroidServicesResolver/Android/ForceResolve
  • 解析完成后,删除所有重复的aar文件
  • 现在建造
    我通过执行以下操作修复了此问题:

  • 转到资产/AndroidServicesResolver/Android/ForceResolve
  • 解析完成后,删除所有重复的aar文件
  • 现在建造

    你的编译器版本是什么?请尝试使缓存无效并重新启动androidstudio@RishvSingla删除cahes后,我再次遇到此错误。您的编译器版本是什么?编译器版本26请尝试使缓存无效并重新启动androidstudio@RishvSingla删除cahes后,我再次收到此错误,包括清理和重建项目并使其无效捕获alsoC:\Users\\.gradle\caches要删除此文件夹?在android studio中转到文件->使缓存无效/重新启动可以删除您的whatsapp号码或messenger用户名吗?在使缓存无效/重新启动后,我收到另一个错误清理并重建项目并使捕获无效alsoC:\Users\\.gradle\caches要删除此文件夹吗?在android中studio go to file->invalidate caches/restart您可以删除您的whatsapp号码或messenger用户名吗?在invalidate caches/restart之后,我遇到了另一个错误尝试清理并同步gradle try it:classpath'com.android.tools.build:gradle:3.1.4'检查您的gradle并下载此gradle您能在空闲时间打电话给我吗?非常感谢!!我在等你。在你对这篇文章的空闲时间评论中,我将在我的PC中为你提供访问权限。请尝试:resolutionStrategy.force'com.android.support:support-v4:27.1.0'在配置中位于通道下方。所有清理和同步渐变都要清理,同步gradlesTry it:classpath'com.android.tools.build:gradle:3.1.4'检查你的gradle并下载这个你能给我你的空闲时间吗?非常感谢!!我在等你。在你对这篇文章的空闲时间评论中,我将在我的个人电脑中为你提供访问权限。请尝试:resolutionStrategy.force'com.android.support:support-v4:27.1.0'在配置中位于车道下方。所有清洁和同步渐变