Hi i want to play an mp3 backround music , i create the res\raw folder and put there an mp3 file and every thing is ok but: when i want to make an mediaplayer object R dont recognize my raw folder . I tryed to clean the project and reopen eclipse thanks for all the helpers :) here is the mainactivity:
package com.example.whatsflagitis;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
MediaPlayer mysong=MediaPlayer.create(MainActivity.this, R.)
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
Try the below steps to resolve the issue,It worked for me: