我使用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
它會立即退出......
事情我想
清理項目...
您是否使用style.xml中的任何樣式作爲該佈局中的微調器或其他視圖 –
Full Logcat:https://pastebin.com/k4MJNH7T – Disco4uf
android:theme =「@ android:style/TextAppearance.Material」 嘗試刪除這 –