构造函数AdPreferences(int,int,String)是未定义的startapp?

时间:2013-05-28 06:25:50

标签: java android

我正在尝试使用Startapp作为我的应用程序,我继续得到此错误,我不知道为什么! 错误在这一行

AdPreferences adPreferences =
    new AdPreferences(developers ID,App ID,AdPreferences.TYPE_INAPP_EXIT);
    htmlAd = new HtmlAd(this); htmlAd.load(adPreferences, this);

我删除了我的ID

这是完整的代码

public class SplashActivity extends WhatsNewActivity implements OnClickListener
{

private Button mButtonPlay;
private HtmlAd htmlAd = null;


@Override
public void onCreate(Bundle icicle)
{



    super.onCreate(icicle);


    setContentView(R.layout.splash);

    mButtonPlay = (Button) findViewById(R.id.button_go);
    mButtonPlay.setOnClickListener(this);

    ImageView image = (ImageView) findViewById(R.id.image_splash);
    image.setImageResource(R.drawable.splash);

    AndroidSDKProvider.setTestMode(true);
    AndroidSDKProvider.initSDK(this);
    AdPreferences adPreferences =
    new AdPreferences(xxxxxxxxx,xxxxxxxxx,AdPreferences.TYPE_INAPP_EXIT);
    htmlAd = new HtmlAd(this); htmlAd.load(adPreferences, this);





}





@Override
public void onBackPressed() {
if(htmlAd != null) {
htmlAd.show();
}
super.onBackPressed();
}


/**
 * {@inheritDoc }
 */
public void onClick(View v)
{
    if (v == mButtonPlay)
    {
        Intent intent = new Intent(this, PaintActivity.class);
        startActivity(intent);
    }
}

@Override
public int getFirstRunDialogTitleRes()
{
    return R.string.first_run_dialog_title;
}

@Override
public int getFirstRunDialogMsgRes()
{
    return R.string.first_run_dialog_message;
}

@Override
public int getWhatsNewDialogTitleRes()
{
    return R.string.whats_new_dialog_title;
}

@Override
public int getWhatsNewDialogMsgRes()
{
    return R.string.whats_new_dialog_message;
}
}

1 个答案:

答案 0 :(得分:0)

开发者ID,App ID需要是String类型而不是int。