java - Cannot resolve symbol 'activityInfo' -



java - Cannot resolve symbol 'activityInfo' -

the line "r.activityinfo" returns "error: cannot find symbol variable activityinfo" on compiling

public class mainactivity extends actionbaractivity {

@override protected void oncreate(bundle savedinstancestate) { log.d("lp1", "created"); super.oncreate(savedinstancestate); final intent mainintent = new intent(intent.action_view, android.net.uri.parse("http://abc")); mainintent.addcategory(intent.category_launcher); final list<resolveinfo> browslist = this.getpackagemanager().queryintentactivities( mainintent, 0); iterator itr = browslist.iterator(); while(itr.hasnext()) { object r = itr.next(); activityinfo s = r.activityinfo; }

... }

you declare object r, object class has not fellow member named activityinfo.

to prepare this, utilize enhanced loop:

for (resolveinfo r : browslist) { activityinfo s = r.activityinfo; }

java android android-intent

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -