Android Studio does not see ArrayList class

Android Studio 0.5.1 does not see the ArrayList class. A quick definition invites me to create a new one. Even when I try to importjava.util.ArrayList;

This only works if I installed import java.util.*;, but Quick Definition still doesn't see it. There is a screenshot http://i60.tinypic.com/jt1doj.jpg

import android.app.Activity;
import android.os.Bundle;
import java.util.*;
public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ArrayList<String> arrayList = new ArrayList<String>();
        ArrayList<Integer> i;
    }
}
+4
source share
2 answers

I think you should try updating your Android Studio. 0.5.1 is really old and AFAIK, earlier versions were filled with bugs. Newer versions are much better, but still there are bugs.

Otherwise, there is nothing wrong with your code regarding ArrayList.

+2

2019 . prblems , arraylist.

0

Source: https://habr.com/ru/post/1531951/


All Articles