Error in the for loop of TweetView

android

#1
    final LinearLayout myLayout
            = (LinearLayout) findViewById(R.id.tweet_layout);

    final List<Long> tweetIds = Arrays.asList(510908133917487104L);
    TweetUtils.loadTweets(tweetIds, new Callback<Tweet>() {
        @Override
        public void success(Result<Tweet> result) {


            for (Tweet tweet : result.data) {
                myLayout.addView(new TweetView(SearchTweet.this, tweet));
            }
        }

        @Override
        public void failure(TwitterException exception) {
            // Toast.makeText(...).show();
        }
    });

#2

I am facing a problem in foreach loop in the above code where it shows result.data as an error when i debug it first it suggest me to remove foreach loop braces and then again shows some error and when i try to debug that it again give me add braces to foreach loop suggestion.


#3