Jason ‘select’ not working in android Studio

Here is my .java file:

I added Jsoup to the dependency but still I can not access the function 'select'. The error says Cannot resolve method 'select' in 'Document'

enter image description here

enter code here    



@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_parsing);
}
private class Content extends AsyncTask<Void,Void,Void>
{
    @Override
    protected Void doInBackground(Void... voids) {
        try {
            Document document= (Document) Jsoup.connect("https://www.dsebd.org/latest_share_price_scroll_by_value.php").get();
            document.select("table.table-bordered.background-white.shares-table.fixedHeader");

        }catch (Exception e)
        {
            Toast.makeText(Parsing.this,""+e,Toast.LENGTH_SHORT).show();
        }
        return null;
    }
}

}

dependencies {

implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'org.jetbrains:annotations:15.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testImplementation 'junit:junit:4.+'
implementation 'org.jsoup:jsoup:1.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

}



Read more here: https://stackoverflow.com/questions/67926493/jason-select-not-working-in-android-studio

Content Attribution

This content was originally published by abrar hasan at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: