我有人抱怨我的應用程序在啓動時獲取FC(同時其他人從未遇到過單一問題)。這是我的完整活動來源。由於它發生在我沒有的設備上,所以我無法修復它。從他們告訴我它不起作用:摩托羅拉Blackflip,摩托羅拉Dext,摩托羅拉CLIQ XT。猜猜摩托羅拉畢竟不喜歡我的應用程序...我的應用程序在幾個設備上獲得「強制關閉」
難道是我允許minSdkVersion =「3」嗎?我在模擬器上測試了1.5,並且工作正常...
非常感謝您的回覆。
public class workit extends Activity implements OnClickListener {
Button yay;
Button yay0;
Button yay1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
yay = (Button) findViewById(R.id.gostart);
yay.setOnClickListener(this);
yay0 = (Button) findViewById(R.id.dontstart);
yay0.setOnClickListener(this);
yay1 = (Button) findViewById(R.id.exit);
yay1.setVisibility(ImageView.GONE);
ImageView inizio = (ImageView)findViewById(R.id.start);
inizio.setVisibility(ImageView.VISIBLE);
inizio.setBackgroundResource(R.drawable.start);
}
public void onClick(View v) {
// TODO Auto-generated method stub
if (v == yay0) {
finish();
}
if (v == yay) {
ImageView inizio = (ImageView)findViewById(R.id.start);
inizio.setVisibility(ImageView.GONE);
WebView work = new WebView(this);
setContentView(work);
work.loadUrl("file:///android_asset/index1.html");
work.setWebViewClient(new work());
work.setBackgroundColor(0);
work.getSettings().setBuiltInZoomControls(true);
work.getSettings().setDefaultZoom(ZoomDensity.FAR);
}
if (v == yay1) {
finish();
}
}
private class work extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.contains("exit.html")) {
// TODO: do what you have to do
finish();
}
view.loadUrl(url);
return true;
}
}
}
你應該看看這個崩潰報告庫,我使用它,它很好地工作,發送崩潰報告到谷歌電子表格。所以你不要依賴市場錯誤報告或任何分鐘。 OS版本。 http://code.google.com/p/acra/ – 2010-09-06 06:37:16
謝謝,我會檢查出來並回來報告結果。 – thpoul 2010-09-06 07:46:11
這些報道是驚人的。我在那裏發現了很多有趣的數據!感謝您分享這一點! – thpoul 2010-09-06 10:12:33