1、INSTALL_FAILED_INVALID_APK: Split lib_slice_5_apk was defined multiple times异常
- 问题描述:点击安装按钮后弹出如下的安装失败提示框
Application Installation Failed
Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK: Split lib_slice_5_apk was defined multiple times.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
在设置里取消Instant Run就可以正常的运行了!
具体方法:Default Preferences -> Instant Run -> 取消勾选Instant Run requires the project to be built with Gradle.
2、PullToRefreshListView的visibility=”gone”的Bug
- 问题:ListView替换为PullToRefreshListView,setAdapter()后发现列表中没有数据显示。
- 原因:在布局文件的< com.handmark.pulltorefresh.library.PullToRefreshListView >元素中指定了android:visibility=”gone”属性(在.java文件里在setAdapter()之前先调用了listView.setVisibility(View.VISIBLE)),在布局文件里去掉此属性,改为在activity的onCreate()里执行listView.setVisibility(View.GONE)后恢复正常。
- 注:没有深入调查这两种方式对PullToRefreshListView有什么区别,对标准ListView是没有区别的。
3、PullToRefreshListView源码中的floatMath过时报错问题
float exactContentHeight = floatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
修改成:
float exactContentHeight = (float)Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
- 共有两处,另一处同理。