简体   繁体   English

AAPT:错误:找不到属性 buttonColor(又名 com.example.*appName*)

[英]AAPT: error: attribute buttonColor (aka com.example.*appName*) not found

I have searched far and high for a solution and tried to also understand this error but there seems not to be much info about this particular error.我已经搜索了很多解决方案,并试图理解这个错误,但似乎没有太多关于这个特定错误的信息。

Here is the activity.xml line where is saying the error is residing (I have two of these as I have two buttons)这是 activity.xml 行,说错误所在(我有两个,因为我有两个按钮)

<info.hoang8f.widget.FButton
            android:id="@+id/btnMakeAnAccount"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_margin="8dp"
            android:text="Make An Account"
            android:textColor="@color/pink"
            fbutton:buttonColor="@color/black"
            fbutton:cornerRadius="4dp"
            fbutton:shadowColor="@android:color/black"
            fbutton:shadowEnabled="true"
            fbutton:shadowHeight="5dp"
            />

at first I was using this library --> implementation 'info.hoang8f:fbutton:1.0.5'起初我使用这个库-> implementation 'info.hoang8f:fbutton:1.0.5'

however due to my emulator not working I came to learn to use this library instead --> implementation 'com.github.jd-alexander:android-flat-button:v1.1' the library details of use is found here https://github.com/jd-alexander/android-flat-button I thought in my code I have adapted it so it could work but obviously not lol但是由于我的模拟器不工作,我开始学习使用这个库来代替 --> 实现 'com.github.jd-alexander:android-flat-button:v1.1' 库的使用细节在这里https:/ /github.com/jd-alexander/android-flat-button我认为在我的代码中我已经对其进行了调整,因此它可以工作但显然不是大声笑

this is the code of me casting the button and its methods in my main btnLogin = (FButton)findViewById(R.id.btnLogin);这是我在我的主要 btnLogin = (FButton)findViewById(R.id.btnLogin) 中投射按钮及其方法的代码; btnMakeAnAccount = (FButton)findViewById(R.id.btnMakeAnAccount); btnMakeAnAccount = (FButton)findViewById(R.id.btnMakeAnAccount);

    btnLogin.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

        }
    });

    btnMakeAnAccount.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

        }
    });

Try to remove button colour and use some another attribute like background color or something else.尝试删除按钮颜色并使用其他属性,例如背景颜色或其他内容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android 包括布局:使用数据绑定传递可绘制参数给出错误:AAPT:错误:找不到属性 mysrc(又名 com.example.APPNAME:mysrc) - Android include layout: pass Drawable parameter using data binding gives error: AAPT: error: attribute mysrc (aka com.example.APPNAME:mysrc) not found 如何修复 AAPT:错误:找不到资源 drawable/tt(又名 com.example.polyresults:drawable/tt) - How to fix AAPT: error: resource drawable/tt (aka com.example.polyresults:drawable/tt) not found Android 错误:AAPT:错误:找不到资源 drawable/ic_bot(又名 com.example.chatbot:drawable/ic_bot) - Android error: AAPT: error: resource drawable/ic_bot (aka com.example.chatbot:drawable/ic_bot) not found AAPT:错误:找不到属性 startIconDrawable - AAPT: error: attribute startIconDrawable not found AAPT:错误:找不到资源样式/Theme.TheDoist.PopupOverlay(又名 com.bawp.todoister:style/Theme.TheDoist.PopupOverlay) - AAPT: error: resource style/Theme.TheDoist.PopupOverlay (aka com.bawp.todoister:style/Theme.TheDoist.PopupOverlay) not found 原因:找不到com.example.exampleCombant.Appname.Database:com / Database.class中找到com.example.example.appname.DataBase - Cause: cannot find com.example.exampleCombant.Appname.Database: com.example.example.appname.DataBase found in com/Database.class 我无法解决错误:找不到资源可绘制/ abc(又名com.example.myapplication:drawable / abc) - I cant solve error:resource drawable/abc (aka com.example.myapplication:drawable/abc) not found AAPT:错误:属性 android:clipToOutline 未找到 - AAPT: error: attribute android:clipToOutline not found com.example.appname.MainActivity.onCreate 上的 AndroidRuntime 错误 - AndroidRuntime error at com.example.appname.MainActivity.onCreate 错误:找不到资源样式/Animation.AppCompat.Dialog(又名 com.example.myapplication:style/Animation.AppCompat.Dialog) - error: resource style/Animation.AppCompat.Dialog (aka com.example.myapplication:style/Animation.AppCompat.Dialog) not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM