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
Post a Comment