微调崩溃上点击
我使用Android-Studio
微调崩溃上点击
我创建一个应用程序它编码
我的飞旋的做工精细,几天后,就彻底打破! ....我不认为这是因为其他代码?
当我点击它应用程序崩溃...
这里是我的微调代码:
Spinner s1;
String[] s1c = {"All","Filter1", "Filter2", "Filter3", "Filter4", "Filter5", "Filter6"};
s1 = (Spinner) findViewById(R.id.cater);
ArrayAdapter<String> adapter = new ArrayAdapter<>(this,
android.R.layout.simple_spinner_item, s1c);
s1.setAdapter(adapter);
s1.setSelection(0);s1.setEnabled(true);
s1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
{
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
// filter1=s1c[position];
// if(mayload ==1) {
// loadlist();
// }else{
// mayload=1;
// }
/*Even Commented anything....*/
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
微调XML:.....关系呢...
<Spinner
android:id="@+id/cater"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="@+id/textView2" />
的logcat:
09-02 16:12:22.603 28394-28394/com.example.discopc.yubismart W/ResourceType: Too many attribute references, stopped at: 0x01010099
09-02 16:12:22.603 28394-28394/com.example.discopc.yubismart W/ResourceType: Too many attribute references, stopped at: 0x0101009a
09-02 16:12:22.603 28394-28394/com.example.discopc.yubismart W/ResourceType: Too many attribute references, stopped at: 0x0101009b
09-02 16:12:22.625 28394-28394/com.example.discopc.yubismart I/Process: Sending signal. PID: 28394 SIG: 9
它甚至dosent说*Example* Stoped working
它会立即退出......
事情我想
清理项目...
检查风格和干净项目build it
他们,这是我想我曾经告诉过的问题? :D – Disco4uf
点击File-Invalid Cashes/Restart在备份您的整个应用程序之前 –
另请参阅此链接https://stackoverflow.com/questions/33283105/too-many-attribute-references-warning-possible-causes –
我在风格android:theme="@android:style/TextAppearance.Material"
一些地方
我删除它工作得很好......
由于维卡斯·库马尔
您是否使用style.xml中的任何样式作为该布局中的微调器或其他视图 –
Full Logcat:https://pastebin.com/k4MJNH7T – Disco4uf
android:theme =“@ android:style/TextAppearance.Material” 尝试删除这 –