android threadid = 1:卡在threadid = 29上,放弃了

时间:2015-06-30 11:45:06

标签: android surfaceview

我的应用有问题。当我试图开始新的活动时它关闭了。在logcat中,我收到此错误:

threadid=1: stuck on threadid=29, giving up
Fatal signal 16 (SIGSTKFLT) at 0x00003591 (code=-6), thread 13797 (Thread-1600)

我把我的代码放在这里

import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class Sklep extends Activity{


InterstitialAd mInterstitialAd; // tutaj


         public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                requestWindowFeature(Window.FEATURE_NO_TITLE);
                setContentView(R.layout.activity_sklep);                 



             final Intent intent = new Intent(this, Main.class);

                mInterstitialAd = new InterstitialAd(this);
                mInterstitialAd.setAdUnitId("ca-app-pub-2868941535761925/2313045696");
                requestNewInterstitial();

                mInterstitialAd.setAdListener(new AdListener() {
                    public void onAdClosed() {
                        requestNewInterstitial();
                        startActivity(intent);
                        finish();
                    }
                });

... 这是应用程序关闭时的位置: 我试图在没有间隙广告的情况下开始新的活动,但它仍在整理应用程序。

   bback.setOnClickListener(new OnClickListener() 
           {

               @Override
                    public void onClick(View v) {

                     if (mInterstitialAd.isLoaded()) {
                         mInterstitialAd.show();
                     }
                         else{

                     startActivity(intent);
                     finish();
                         }


                }


           });

0 个答案:

没有答案