我正在尝试制作一个具有滑动活动的音板。我已成功设法进行滑动活动但是当我尝试将声音加载到.java文件中时,它给出了一个错误,说'#34; SoundPool中的load()无法应用于"下面两个**中的代码是错误出现的地方。
package com.jonatboard.jonat.htssoundboard;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.media.AudioManager;
import android.media.SoundPool;
public class FragmentOne extends Fragment {
SoundPool sclubb1;
int clubb1Id;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// TODO Auto-generated method stub
return inflater.inflate(R.layout.fragment_one_layout,container,false);
sclubb1 = new SoundPool(10,AudioManager.STREAM_MUSIC,0);
clubb1Id = sclubb1.load **(this,R.raw.clubb1,1)**; }
public void playSound1(View view) {
sclubb1.play(clubb1Id, 1, 1, 1, 0, 1);
}
}