我在Android Studio中收到这些错误:
$dataProvider = new \yii\data\ActiveDataProvider([
'query' => Products::find()->from(['products' => $archivedItemsQuery]),
'pagination' => [
'pageSize' => 10,
],
]);
我的Gradle:
Error:(9, 5) error: style attribute 'attr/colorError (aka com.kevinladelfa.duevent:attr/colorError)' not found.
Error:(11, 5) error: style attribute 'attr/colorPrimary (aka com.kevinladelfa.duevent:attr/colorPrimary)' not found.
C:\Users\kevin\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\55eaded1d173457b819b46407cb2076d\res\values-v26\values-v26.xml
Error:(11, 5) error: style attribute 'attr/colorAccent (aka com.kevinladelfa.duevent:attr/colorAccent)' not found.
Error:(11, 5) error: style attribute 'attr/colorPrimaryDark (aka com.kevinladelfa.duevent:attr/colorPrimaryDark)' not found.
C:\Users\kevin\.gradle\caches\transforms-1\files-1.1\cardview-v7-26.1.0.aar\c45ee84ab726285b089716ddfdae856c\res\values\values.xml
Error:(13, 5) error: style attribute 'attr/colorError (aka com.kevinladelfa.duevent:attr/colorError)' not found.
C:\Users\kevin\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\55eaded1d173457b819b46407cb2076d\res\values-v17\values-v17.xml
Error:(27, 5) error: resource dimen/abc_dropdownitem_text_padding_left (aka com.kevinladelfa.duevent:dimen/abc_dropdownitem_text_padding_left) not found.
Error:resource style/Theme.AppCompat.Light.DarkActionBar (aka com.kevinladelfa.duevent:style/Theme.AppCompat.Light.DarkActionBar) not found.
C:\Users\kevin\Desktop\Duevent\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Error:(183) style attribute 'attr/colorPrimary (aka com.kevinladelfa.duevent:attr/colorPrimary)' not found.
Error:(184) style attribute 'attr/colorPrimaryDark (aka com.kevinladelfa.duevent:attr/colorPrimaryDark)' not found.
Error:(185) style attribute 'attr/colorAccent (aka com.kevinladelfa.duevent:attr/colorAccent)' not found.
Error:resource style/Base.Theme.AppCompat.Dialog.FixedSize (aka com.kevinladelfa.duevent:style/Base.Theme.AppCompat.Dialog.FixedSize) not found.
Error:resource style/Base.Theme.AppCompat.Light.Dialog.FixedSize (aka com.kevinladelfa.duevent:style/Base.Theme.AppCompat.Light.Dialog.FixedSize) not found.
Error:resource style/Base.V7.Widget.AppCompat.AutoCompleteTextView (aka com.kevinladelfa.duevent:style/Base.V7.Widget.AppCompat.AutoCompleteTextView) not found.
Error:resource style/Base.V7.Widget.AppCompat.EditText (aka com.kevinladelfa.duevent:style/Base.V7.Widget.AppCompat.EditText) not found.
Error:resource style/Base.V14.Widget.Design.AppBarLayout (aka com.kevinladelfa.duevent:style/Base.V14.Widget.Design.AppBarLayout) not found.
Error:resource style/Base.V23.Theme.AppCompat (aka com.kevinladelfa.duevent:style/Base.V23.Theme.AppCompat) not found.
Error:resource style/Base.V23.Theme.AppCompat.Light (aka com.kevinladelfa.duevent:style/Base.V23.Theme.AppCompat.Light) not found.
C:\Users\kevin\Desktop\Duevent\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v26\values-v26.xml
Error:(7) style attribute 'attr/colorError (aka com.kevinladelfa.duevent:attr/colorError)' not found.
Error:(11) style attribute 'attr/colorError (aka com.kevinladelfa.duevent:attr/colorError)' not found.
Error:resource style/Base.V7.Widget.AppCompat.Toolbar (aka com.kevinladelfa.duevent:style/Base.V7.Widget.AppCompat.Toolbar) not found.
Error:resource style/Base.Widget.AppCompat.DrawerArrowToggle.Common (aka com.kevinladelfa.duevent:style/Base.Widget.AppCompat.DrawerArrowToggle.Common) not found.
C:\Users\kevin\Desktop\Duevent\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-hdpi-v4\values-hdpi-v4.xml
Error:(4) error: style attribute 'attr/barLength (aka com.kevinladelfa.duevent:attr/barLength)' not found.
Error:(5) error: style attribute 'attr/gapBetweenBars (aka com.kevinladelfa.duevent:attr/gapBetweenBars)' not found.
Error:(6) error: style attribute 'attr/drawableSize (aka com.kevinladelfa.duevent:attr/drawableSize)' not found.
Error:(4) style attribute 'attr/barLength (aka com.kevinladelfa.duevent:attr/barLength)' not found.
Error:(5) style attribute 'attr/gapBetweenBars (aka com.kevinladelfa.duevent:attr/gapBetweenBars)' not found.
Error:(6) style attribute 'attr/drawableSize (aka com.kevinladelfa.duevent:attr/drawableSize)' not found.
Error:resource style/Base.DialogWindowTitle.AppCompat (aka com.kevinladelfa.duevent:style/Base.DialogWindowTitle.AppCompat) not found.
C:\Users\kevin\Desktop\Duevent\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v17\values-v17.xml
Error:(24) resource dimen/abc_dropdownitem_text_padding_left (aka com.kevinladelfa.duevent:dimen/abc_dropdownitem_text_padding_left) not found.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
答案 0 :(得分:1)
所有错误“颜色错误或字体错误”来自graddle / app中更高版本的firebase ui。尝试使用它的较低版本。
或者尝试使用它:
maven {
url 'https://maven.google.com'
}
您可以随时查看: https://firebase.google.com/support/release-notes/android
并尝试添加:
android {
compileSdkVersion 26
buildToolsVersion "26.1.0"
defaultConfig {
applicationId "..."
minSdkVersion 22
targetSdkVersion 26
或者减少sdk和AppCompat版本以检查较低版本是否正常工作。
compileSdkVersion 25
buildToolsVersion "25.3.1"
defaultConfig {
applicationId "..."
minSdkVersion 22
targetSdkVersion 25
....
'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
等等。
此外,不要忘记每周至少重启一次Mac)模拟器效果更好