sitekey = site["src"].split("=")[-1]
currenturl = driver.current_url
print (currenturl)
flag, captcha = solve_h_captcha(sitekey,currenturl)
username = driver.find_element_by_name('g-recaptcha-response')
username.send_keys(captcha)
time.sleep(2)
username = driver.find_element_by_name('h-captcha-response')
username.send_keys(captcha)
time.sleep(2)
# username.send_keys(captcha)
time.sleep(0.5)
模型类{
XML
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<TextView
android:id="@+id/texttype"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.118"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.132" />
<TextView
android:id="@+id/textfats"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.6"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/texttype"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.118"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.132" />
<TextView
android:id="@+id/textfats"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.6"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
}
'
公共类产品扩展了AppCompatActivity {
private String Type;
private String Fats;
public productsmodel(){}
public productsmodel(String Type, String Fats){
this.Type = Type;
this.Fats=Fats;
}
public String getType() {
return Type;
}
public void setType(String type) {
Type = type;
}
public String getFats() {
return Fats;
}
public void setFats(String fats) {
Fats = fats;
}
}`
我运行产品后,我的产品活动不断崩溃。我在尝试着 在产品页面中添加回收者视图,这将使我能够进入 数据从云端Firestore自动进入我的回收站视图。我有 附上与该功能和错误有关的所有代码。请 检查一下,谢谢!
https://i.stack.imgur.com/Bs3sn.png(错误显示)
https://i.stack.imgur.com/7ePke.png(模型类)
https://i.stack.imgur.com/k6aAK.png(产品类)
https://i.stack.imgur.com/DeVwZ.png(XML)
https://i.stack.imgur.com/zZxtx.png(firestore数据库)
答案 0 :(得分:0)
只需添加
FirebaseFirestore firebase = FirebaseFirestore.getInstance()
在使用Firebase之前,在onCreate方法中。