Nao sei o que estou fazendo de errado =l
Toda movimentacao que tento fazer no app, mesmo adicionando um simples Texto, o app quebra.
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyApplication">
<activity android:name=".ActivityMain"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
public class ActivityMain extends Activity {
@Override
protected void onPostCreate(@Nullable Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
List<String> alunos = new ArrayList<>(Arrays.asList("Igor","Pedro","Joao"));
//ListView listaDeAlunos = findViewById(R.id.activity_main_listaAlunos);
//listaDeAlunos.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1,alunos));
TextView primeiroAluno = findViewById(R.id.textView2);
primeiroAluno.setText(alunos.get(0));
setContentView(primeiroAluno);
}
}