質問編集履歴
1
エラーメッセージを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
```java
|
5
5
|
class MusicClass{
|
6
6
|
private String path = "http://xxxx/yyyy.mp3";
|
7
|
-
MediaPlayer mp = MediaPlayer.create(this, Uri.parse(path));
|
7
|
+
MediaPlayer mp = MediaPlayer.create(this, Uri.parse(path));
|
8
|
+
//ここでエラー発生 「メソッド 'create(com.android.aaa.MusicClass, android.net.Uri)' を解決できません」
|
8
9
|
|
9
10
|
public void Start(){
|
10
11
|
mp.start();
|
@@ -15,6 +16,7 @@
|
|
15
16
|
}
|
16
17
|
```
|
17
18
|
|
19
|
+
|
18
20
|
コンテキストというものがイマイチ分かっておらず、いつもthisを入れていたのですが、それがエラーの原因のようです。
|
19
21
|
この場合、何を入れたら良いのでしょうか?
|
20
22
|
|