Olá!
Aparentemente a memória não está dando conta de tantos Players e arquivos mp3 carregados ao mesmo tempo...
Pelo que entendi, você quer executar o áudio selecionado pelo nome de uma cor, informado em
txtColor.
Até aí, ok.
O que eu não entendi é: por que você cria um MediaPlayer para cada cor?
Por que não criar apenas um MediaPlayer e carregar o áudio adequado no momento da execução?
Exemplo:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private btMain As Button
Private txtColor As EditText
Private btcheck As Button
Private lblred As Label
Private lblblue As Label
Private lblgreen As Label
Private lblyellow As Label
Private lblpur As Label
Private lblpin As Label
Private lblora As Label
Private lblgray As Label
Private lblbla As Label
Private lblbro As Label
Private btClean As Button
'Usando apenas um MediaPlayer
Private player As MediaPlayer
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("TelaColors")
player.Initialize
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btMain_Click
Activity.Finish
End Sub
Sub btcheck_Click
' If txtColor.Text="" Then
' player.Stop
' playblue.Stop
' playgreen.Stop
' playyellow.Stop
' playpurple.Stop
' playpink.Stop
' playorange.Stop
' playgray.Stop
' playblack.Stop
' playbrown.Stop
' End If
If txtColor.Text="" Then 'Caso txtColor esteja em branco
player.Stop 'Interrompe o MediaPlayer
Return 'E encerra a Sub
End If
player.Load(File.DirAssets,$"${txtColor.Text}.mp3"$) 'Carrega o arquivo especificado em txtColor.Text
player.Play 'E reproduz o áudio
Select txtColor 'Aqui você atualiza suas views de acordo com a "cor" escolhida...
Case "red"
lblred.Visible=True
txtColor.Text=""
Case "blue"
lblblue.Visible=True
txtColor.Text=""
Case "green"
lblgreen.Visible=True
txtColor.Text=""
Case "yellow"
lblyellow.Visible=True
txtColor.Text=""
Case "purple"
lblpur.Visible=True
txtColor.Text=""
Case "pink"
lblpin.Visible=True
txtColor.Text=""
Case "orange"
lblora.Visible=True
txtColor.Text=""
Case "gray"
lblgray.Visible=True
txtColor.Text=""
Case "black" Then
lblbla.Visible=True
txtColor.Text=""
Case "brown" Then
lblbro.Visible=True
txtColor.Text=""
End Select
End Sub
Tenta isso e vê se funciona.
Espero ter ajudado.
Abraços