当我开始我的第一个Kotlin项目&安装 Android studio 3 beta 2 我遇到了这个问题
错误:(29,38)找不到与给定名称匹配的资源(at 'layout_width',其值为'@ dimen / abc_dropdownitem_icon_width')。
错误:(20,26)找不到与给定名称匹配的资源(at,at 'alpha'的值为'@ dimen / highlight_alpha_material_colored')。
错误:(29,38)找不到与给定名称匹配的资源(at 'layout_width',其值为'@ dimen / abc_dropdownitem_icon_width')。
错误:(59,39)找不到与给定名称匹配的资源(at 'layout_width',其值为'@ dimen / abc_dropdownitem_icon_width')。
错误:(20,26)找不到与给定名称匹配的资源(at,at 'alpha'的值为'@ dimen / highlight_alpha_material_colored')。
错误:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:执行时出错 进程/home/programmer/Android/Sdk/build-tools/26.0.1/aapt with 参数{package -f --no-crunch -I /home/programmer/Android/Sdk/platforms/android-26/android.jar -M /home/programmer/AndroidStudioProjects/MyFirstAppKotlin/app/build/intermediates/manifests/full/debug/AndroidManifest.xml -S / home / programmer / AndroidStudioProjects / MyFirstAppKotlin / app / build / intermediates / res / merged / debug -m -J / home / programmer / AndroidStudioProjects / MyFirstAppKotlin / app / build / generated / source / r / debug -F /home/programmer/AndroidStudioProjects/MyFirstAppKotlin/app/build/intermediates/res/debug/resources-debug.ap_ --custom-package com.example.programmer.myfirstappkotlin -0 apk --output-text-symbols / home / programmer / AndroidStudioProjects / MyFirstAppKotlin / app / build / intermediates / symbols / debug --no版本向量}
错误:com.android.ide.common.process.ProcessException:同时出错 执行过程/home/programmer/Android/Sdk/build-tools/26.0.1/aapt 带参数{package -f --no-crunch -I /home/programmer/Android/Sdk/platforms/android-26/android.jar -M /home/programmer/AndroidStudioProjects/MyFirstAppKotlin/app/build/intermediates/manifests/full/debug/AndroidManifest.xml -S / home / programmer / AndroidStudioProjects / MyFirstAppKotlin / app / build / intermediates / res / merged / debug -m -J / home / programmer / AndroidStudioProjects / MyFirstAppKotlin / app / build / generated / source / r / debug -F /home/programmer/AndroidStudioProjects/MyFirstAppKotlin/app/build/intermediates/res/debug/resources-debug.ap_ --custom-package com.example.programmer.myfirstappkotlin -0 apk --output-text-symbols / home / programmer / AndroidStudioProjects / MyFirstAppKotlin / app / build / intermediates / symbols / debug --no版本向量}
错误:org.gradle.process.internal.ExecException:进程'命令 '/home/programmer/Android/Sdk/build-tools/26.0.1/aapt''完成了 非零退出值1
错误:任务':app:processDebugResources'执行失败。
无法执行aapt
感谢您的帮助。
答案 0 :(得分:0)
尝试替换
行ext.kotlin_version
在build.gradle - 项目中
ext.kotlin_version =' 1.1.2-4'