主要错误信息 :error: resource attr/colorPrimary (aka android.support.design:attr/colorPrimary) not found.
error: resource style/Animation.AppCompat.Dialog (aka android.support.design:style/Animation.AppCompat.Dialog) not found.
错误日志:
error: resource style/Animation.AppCompat.Dialog (aka android.support.design:style/Animation.AppCompat.Dialog) not found.
out/target/common/obj/JAVA_LIBRARIES/NoahDict_design_intermediates/aar/res/values/values.xml:245: error: resource attr/colorPrimary (aka android.support.design:attr/colorPrimary) not found.
out/target/common/obj/JAVA_LIBRARIES/NoahDict_design_intermediates/aar/res/values/values.xml:249: error: resource attr/colorAccent (aka android.support.design:attr/colorAccent) not found.
out/target/common/obj/JAVA_LIBRARIES/NoahDict_design_intermediates/aar/res/values/values.xml:253: error: resource attr/selectableItemBackground (aka android.support.design:attr/selectableItemBackground) not found.
error: resource style/TextAppearance.AppCompat.Display1 (aka android.support.design:style/TextAppearance.AppCompat.Display1) not found.
error: resource style/TextAppearance.AppCompat.Caption (aka android.support.design:style/TextAppearance.AppCompat.Caption) not found.
error: resource style/TextAppearance.AppCompat.Caption (aka android.support.design:style/TextAppearance.AppCompat.Caption) not found.
error: resource style/TextAppearance.AppCompat.Caption (aka android.support.design:style/TextAppearance.AppCompat.Caption) not found.
error: resource style/TextAppearance.AppCompat.Caption (aka android.support.design:style/TextAppearance.AppCompat.Caption) not found.
out/target/common/obj/JAVA_LIBRARIES/NoahDict_design_intermediates/aar/res/values/values.xml:268: error: resource attr/colorControlActivated (aka android.support.design:attr/colorControlActivated) not found.
error: resource style/TextAppearance.AppCompat.Button (aka android.support.design:style/TextAppearance.AppCompat.Button) not found.
out/target/common/obj/JAVA_LIBRARIES/NoahDict_design_intermediates/aar/res/values/values.xml:277: error: style attribute 'attr/textAllCaps (aka android.support.design:attr/textAllCaps)' not found.
error: resource style/Theme.AppCompat (aka android.support.design:style/Theme.AppCompat) not found.
error: resource style/Theme.AppCompat.Dialog (aka android.support.design:style/Theme.AppCompat.Dialog) not found.
error: resource style/Theme.AppCompat.Light (aka android.support.design:style/Theme.AppCompat.Light) not found.
error: resource style/Theme.AppCompat.Light.Dialog (aka android.support.design:style/Theme.AppCompat.Light.Dialog) not found.
error: resource style/Animation.AppCompat.Dialog (aka android.support.design:style/Animation.AppCompat.Dialog) not found.
out/target/common/obj/JAVA_LIBRARIES/IntelligentGuideStudy_design-25.3.1_intermediates/aar/res/values/values.xml:245: error: expected color reference but got (raw string) attr/colorPrimary.
out/target/common/obj/JAVA_LIBRARIES/IntelligentGuideStudy_design-25.3.1_intermediates/aar/res/values/values.xml:249: error: expected color but got (raw string) attr/colorAccent.
out/target/common/obj/JAVA_LIBRARIES/IntelligentGuideStudy_design-25.3.1_intermediates/aar/res/values/values.xml:253: error: expected reference but got (raw string) attr/selectableItemBackground.
out/target/common/obj/JAVA_LIBRARIES/IntelligentGuideStudy_design-25.3.1_intermediates/aar/res/values/values.xml:255: error: expected color but got (raw string) android:textColorPrimary.
error: resource style/TextAppearance.AppCompat.Display1 (aka android.support.design:style/TextAppearance.AppCompat.Display1) not found.
out/target/common/obj/JAVA_LIBRARIES/IntelligentGuideStudy_design-25.3.1_intermediates/aar/res/values/values.xml:258: error: expected color reference but got (raw string) android:attr/textColorPrimary.
error: resource style/TextAppearance.AppCompat.Caption (aka android.support.design:style/TextAppearance.AppCompat.Caption) not found.
error: resource style/TextAppearance.AppCompat.Caption (aka android.support.design:style/TextAppearance.AppCompat.Caption) not found.
error: resource style/TextAppearance.AppCompat.Caption (aka android.support.design:style/TextAppearance.AppCompat.Caption) not found.
error: resource style/TextAppearance.AppCompat.Caption (aka android.support.design:style/TextAppearance.AppCompat.Caption) not found.
out/target/common/obj/JAVA_LIBRARIES/IntelligentGuideStudy_design-25.3.1_intermediates/aar/res/values/values.xml:268: error: expected color reference but got (raw string) attr/colorControlActivated.
out/target/common/obj/JAVA_LIBRARIES/IntelligentGuideStudy_design-25.3.1_intermediates/aar/res/values/values.xml:272: error: expected color reference but got (raw string) android:textColorPrimary.
error: resource style/TextAppearance.AppCompat.Button (aka android.support.design:style/TextAppearance.AppCompat.Button) not found.
out/target/common/obj/JAVA_LIBRARIES/IntelligentGuideStudy_design-25.3.1_intermediates/aar/res/values/values.xml:276: error: expected color reference but got (raw string) android:textColorSecondary.
out/target/common/obj/JAVA_LIBRARIES/IntelligentGuideStudy_design-25.3.1_intermediates/aar/res/values/values.xml:277: error: style attribute 'attr/textAllCaps (aka android.support.design:attr/textAllCaps)' not found.
error: resource style/Theme.AppCompat (aka android.support.design:style/Theme.AppCompat) not found.
error: resource style/Theme.AppCompat.Dialog (aka android.support.design:style/Theme.AppCompat.Dialog) not found.
error: resource style/Theme.AppCompat.Light (aka android.support.design:style/Theme.AppCompat.Light) not found.
error: resource style/Theme.AppCompat.Light.Dialog (aka android.support.design:style/Theme.AppCompat.Light.Dialog) not found.
解决:
引用Design
、appCompat
包采用这样的方式
LOCAL_STATIC_JAVA_LIBRARIES := dictenginelib \
android-support-design \
android-support-v7-appcompat \
其他的都不用添加。
其他support也可以这样引用
android-support-v7-appcompat-24.0.0
android-support-dynamic-animation
android-support-percent
android-support-v7-gridlayout
android-support-v14-preference
android-support-media-compat
android-support-core-ui
android-support-compat
android-support-v4a_tv
android-support-v13
android-support-vector-drawable-23.4.0
android-support-v7-recyclerview
android-support-v4-lib
android-support-v7-preference
android-support-v7-cardview
android-support-v7-appcompat
android-support-v8-renderscript
android-support-transition
android-support-annotations
android-support-design
android-support-v4
--来自 chenhuachun、gongwei share
网友评论