Android Studio 0.5.1 doesn't see ArrayList class. Quick Definition suggest me create a new one.
Even when I try to import java.util.ArrayList;
It works only if I set import java.util.*;
, but Quick Definition still doesn't see.
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;
}
}
I think you should try upgrading your Android Studio. 0.5.1 is really old and AFAIK, earlier versions were filled with bugs. Newer versions are a lot better, but still some bugs.
Otherwise, there is nothing wrong with your code regarding ArrayList.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With