1.无法下载依赖,ssr端口改了..
2.ssl peer问题:把依赖库的https改为http
3.readtime out:尝试不用翻墙,如果关掉翻墙还显示翻墙,删除.gradle文件夹下gradle.properties文件
4.如果某些东西死都下不来,向下调整jcenter()的位置,因为他包括来很多?
jcenter seems to have wiped a lot of dependencies lately
make sure to move down
jcenter() to the bottom of the repositories for the build.gradle + app/build.gradle
this solved our build and documented on many other places. this has nothing todo with react-native-camera it self
- RecyclerView EditText错乱
val inputNum = helper.getView<EditText>(R.id.stock_real_number)
inputNum.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) {
try {
if (inputNum.text.toString().toDouble() < 0) {
inputNum.setText(0.toString())
}
// item.partsInfo.partsStockTotal.localCheckListAmont = helper.getView<EditText>(R.id.stock_real_number).text.toString().toDouble()
val input = inputNum.text.toString().toDouble()
data[helper.layoutPosition].partsInfo.partsStockTotal.localCheckListAmont = input
} catch (e: Exception) {
}
}
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
}
})
- 怎么处理崩溃后logcat消失? 选择过滤为:nofilter即可。。。
while (`is`.read(buffer).also { byteCount = it } != -1) {
fos.write(buffer, 0, byteCount)
}
- 莫名其妙的覆盖问题:检查elevation属性
- EditText可以获取焦点,但没有光标,不弹键盘,也无法输入
// 外边是横向的linear均分
// EditText高是wrap时出现,我暂时直接写死edit高了
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginLeft="5dp"
>
<EditText
android:id="@+id/tv_benci"
android:layout_width="match_parent"
android:layout_height="23dp"
android:inputType="number|numberDecimal"
android:gravity="end"
android:textColor="@color/colorRed"
android:background="@color/colorTransparent"
android:textSize="17sp"
android:text="@={data.chargemoney}"
tools:text="99.0"
/>
<TextView
android:id="@+id/gang"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:text="/"
/>
<EditText
android:id="@+id/tv_jiaqiliang"
android:layout_width="match_parent"
android:layout_height="23dp"
android:inputType="number|numberDecimal"
android:gravity="end"
android:textColor="@color/colorRed"
android:background="@color/colorTransparent"
android:textSize="17sp"
android:text="@={data.chargeoilnum}"
tools:text="99.0"
/>
</LinearLayout>
- 序列化中parcelable涉及到继承时,子类不需要实现parcelable接口,注意
super.writeTo
调用时机,我放到最后一个就可以了。kotlin编辑器默认是在第一个;嵌套parcelable下,内部parcelable一直报classnotfound,试着把classloader换成外边类的。。