Only the original thread that created a view hierarchy can touch its views.
出现这种情况的原因是在子线程中调用了主线程的UI组件
Your Project contains error(s), please fix them before running your application.
drawable目录下的图片不能使用数字和大写字母命名,否则就出现这种错误。
解决Exception raised during rendering: com/android/util/PropertiesMap (Details)
在android studio中无法预览布局时候,尝试更改版本即可。google后是2.1版本后出现的问题。
Exception raised during rendering: com/android/util/PropertiesMap
缺少部分关键词,检查代码。 是layout_weight 不是weight
drawable下图片过大
java.lang.OutOfMemoryError:
Failed to allocate a 23970828 byte allocation with 2097152 free bytes and 2MB until OOM
解决方法
android:hardwareAccelerated="false"
android:largeHeap="true"
数组(array)索引(index)越界(outofbounds)异常(exception)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=9; index=9
例如:
private String data[][]={{"1"," 11"},{"2"," 22"},
{"3"," 33"},{"3"," 44"},{"5"," 55"},
{"6"," 66"},{"7"," 77"},{"8"," 88"},{"9"," 99"}};
/*省略若干*/
for (int i=0;i<=this.data.length;i++){
Map<String,String> map=new HashMap<String, String>();
map.put("name_id",data[i][0]);
map.put("name",data[i][1]);
this.list.add(map);
}
该例子中出现 “=” 导致数组索引越界 去掉“=”则ok。
出现这种情况的原因是在子线程中调用了主线程的UI组件
Your Project contains error(s), please fix them before running your application.
drawable目录下的图片不能使用数字和大写字母命名,否则就出现这种错误。
解决Exception raised during rendering: com/android/util/PropertiesMap (Details)
在android studio中无法预览布局时候,尝试更改版本即可。google后是2.1版本后出现的问题。
Exception raised during rendering: com/android/util/PropertiesMap
缺少部分关键词,检查代码。 是layout_weight 不是weight
drawable下图片过大
java.lang.OutOfMemoryError:
Failed to allocate a 23970828 byte allocation with 2097152 free bytes and 2MB until OOM
解决方法
android:hardwareAccelerated="false"
android:largeHeap="true"
数组(array)索引(index)越界(outofbounds)异常(exception)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=9; index=9
例如:
private String data[][]={{"1"," 11"},{"2"," 22"},
{"3"," 33"},{"3"," 44"},{"5"," 55"},
{"6"," 66"},{"7"," 77"},{"8"," 88"},{"9"," 99"}};
/*省略若干*/
for (int i=0;i<=this.data.length;i++){
Map<String,String> map=new HashMap<String, String>();
map.put("name_id",data[i][0]);
map.put("name",data[i][1]);
this.list.add(map);
}
该例子中出现 “=” 导致数组索引越界 去掉“=”则ok。