[英]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.