[英]The constructor AdPreferences(int, int, String) is undefined startapp?
I'm trying to use Startapp for my app, i keep on getting this error i don't know why ! 我正在尝试将Startapp用于我的应用程序,但我不断收到此错误,我不知道为什么! the error is at this line 错误在这一行
AdPreferences adPreferences =
new AdPreferences(developers ID,App ID,AdPreferences.TYPE_INAPP_EXIT);
htmlAd = new HtmlAd(this); htmlAd.load(adPreferences, this);
I removed my IDs 我删除了我的ID
Here is the full code 这是完整的代码
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;
}
}
开发人员ID,应用ID必须为String类型,而不是int。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.