- Home /
Can I instance ArrayList[String] through AndroidJavaObject ?
AndroidJavaObject list = new AndroidJavaObject("java.util.ArrayList<String>");
the code above throw Method Not Found exception. How can I instance the ArrayList with type String ?
Comment
Answer by tarasfromlviv · Jul 18, 2016 at 08:57 AM
Generics information in java is only compile time so at runtime there is no such signature. Just use non-generic version.
Answer by zilch · Dec 03, 2013 at 01:02 PM
you can use AndroidJavaObject list = new AndroidJavaObject("java.util.ArrayList") instead
Can you please tell how to add string or any object to this list?
Your answer
Follow this Question
Related Questions
Using AndroidJavaClass in a java Unity3d plugin 0 Answers
AndroidJavaClass. Call returns null ptr. 1 Answer
Unity Plugin or Unity in Android SDK. 0 Answers
Uncomiled Java code Android 0 Answers