奇怪的Android错误:****错误未知类型0x73736572(glSizeof,72)

时间:2014-03-30 18:23:01

标签: android

我面临着一种超级怪异的情况,说实话,我很快就会开始哭泣。

我创建了一个视图 - 在底部显示一个admob横幅。对我来说一切似乎都没问题,但我注意到了

  1. 显示活动需要很长时间
  2. 在整个logcat控制台上发生了一个奇怪的错误。
  3. 这里的错误(重复一百次):

    03-30 14:16:14.052: E/eglCodecCommon(999): glUtilsParamSize: unknow param 0x00000b44
    03-30 14:16:14.122: E/eglCodecCommon(999): glUtilsParamSize: unknow param 0x00000bd0
    03-30 14:16:14.252: E/eglCodecCommon(999): **** ERROR unknown type 0x73736572 (glSizeof,72)
    

    当我按下后退按钮并且我没有参加活动时,一切都停止了。

    这是我的布局:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:ads="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:context=".AllJokes" 
        android:background="@drawable/background"
        android:id="@+id/allJokesLo">
    
        <ListView
                  android:id="@+id/allJokesList"
                  android:layout_width="fill_parent"
                  android:layout_height="0dp"
                  android:layout_weight="1"
                  android:gravity="center">
        </ListView>
    
    
        <com.google.android.gms.ads.AdView android:id="@+id/adView"
    
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:gravity="center_vertical"
                  ads:adUnitId="ca-app-pub-code/code"
                  ads:adSize="BANNER"
        />
    
    </LinearLayout>
    

    这是java部分:

    public class AllJokes extends Activity {
    
        public static ArrayAdapter<String> adapter;
        public static ListView listView;
         private AdView adView;
    
          /* Your ad unit id. Replace with your actual ad unit id. */
          private static final String AD_UNIT_ID = "ca-app-pub-code/code";
    
        @SuppressLint("NewApi")
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_all_jokes);        
    
            adView = new AdView(this);
            adView.setAdSize(AdSize.BANNER);
            adView.setAdUnitId(AD_UNIT_ID);
    
            // Add the AdView to the view hierarchy. The view will have no size
            // until the ad is loaded.
            final ViewGroup adViewContainer = (ViewGroup) findViewById(R.id.adView);
            adViewContainer.addView(adView);
    
            // Create an ad request. Check logcat output for the hashed device ID to
            // get test ads on a physical device.
            AdRequest adRequest = new AdRequest.Builder()
              .addTestDevice("B3EEABB8EE11C2BE770B684D95219ECB")
                .build();
    
            // Start loading the ad in the background.
            adView.loadAd(adRequest);
    
            final GlobalsHolder globals = (GlobalsHolder)getApplication();
                new loadJson().execute();
            adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, new ArrayList<String>());
            adapter.clear();
            adapter.addAll(globals.getMyStringArray());
    
            listView = (ListView) findViewById(R.id.allJokesList);
            listView.setAdapter(adapter);
            listView.setBackgroundColor(Color.WHITE);
    
            listView.setOnItemClickListener(new OnItemClickListener() {
                public void onItemClick(AdapterView<?> parent, View view,
                        int position, long id) {
                    globals.setClickedJokeName((String) ((TextView) view).getText());
                    openJokeBody(view);
    
                    globals.setClickedPosition(position);
    
                    // When clicked, shows a toast with the TextView text
                    Toast.makeText(getApplicationContext(),
                    ((TextView) view).getText(), Toast.LENGTH_SHORT).show();
                }
            });
    
        }
         @Override
          public void onResume() {
            super.onResume();
            if (adView != null) {
              adView.resume();
            }
          }
    
          @Override
          public void onPause() {
            if (adView != null) {
              adView.pause();
            }
            super.onPause();
          }
    
          /** Called before the activity is destroyed. */
          @Override
          public void onDestroy() {
            // Destroy the AdView.
            if (adView != null) {
              adView.destroy();
            }
            super.onDestroy();
          }
    
        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            // Inflate the menu; this adds items to the action bar if it is present.
            getMenuInflater().inflate(R.menu.all_jokes, menu);
            return true;
        }
    
        public class loadJson extends AsyncTask<Void, Integer, String[]>{
    
            private ProgressDialog Dialog = new ProgressDialog(AllJokes.this);
    
            @Override
            protected void onPreExecute()
            {
                Dialog.setMessage("Fetching the latest jokes!");
                Dialog.show();
            }
    
            @Override
            protected String[] doInBackground(Void... params) {
                /*Getting the joke names JSON string response from the server*/
                URL u;
                StringBuffer buffer = new StringBuffer();
                StringBuffer buffer2 = new StringBuffer();
                try {
                    u = new URL("https://site.com/android/Jokes/showJokes.php?JokeCat=allJokes");
                    URLConnection conn = u.openConnection();
                    BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    
                    String inputLine;
                    while ((inputLine = in.readLine()) != null) 
                        buffer.append(inputLine);
                    in.close();         
                }catch(Exception e){
                    e.printStackTrace();
                }
                try {
                    u = new URL("https://site.com/android/britishJokes/JokesBody.php?JokeCat=allJokes");
                    URLConnection conn = u.openConnection();
                    BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    
                    String inputLine;
                    while ((inputLine = in.readLine()) != null) 
                        buffer2.append(inputLine);
                    in.close();         
                }catch(Exception e){
                    e.printStackTrace();
                }
    //          return buffer.toString(); ako se naloji da vurna - da pogledna tva return4e
                return new String[]{buffer.toString(), buffer2.toString()};
            }
    
            @SuppressLint("NewApi")
            protected void onPostExecute(String[] buffer) {
                final GlobalsHolder globals = (GlobalsHolder)getApplication();
                JSONArray jsonArray = new JSONArray();
                JSONArray jsonArray1 = new JSONArray();
                try {
                    jsonArray = new JSONArray(buffer[0]);
                    jsonArray1 = new JSONArray(buffer[1]);
                } catch (JSONException e) {
                    e.printStackTrace();
                }           
           /*Looping trough the results and adding them to a list*/
            ArrayList<String> list = new ArrayList<String>();     
            ArrayList<String> list1 = new ArrayList<String>();   
            if (jsonArray != null) { 
               int len = jsonArray.length();
               for (int i=0;i<len;i++){ 
                try {
                    list.add(jsonArray.get(i).toString());
                    globals.setJokeNamesList(list);
                } catch (JSONException e) {
                    e.printStackTrace();
                }
              } 
            }
    
            if (jsonArray != null) { 
                   int len = jsonArray1.length();
                   for (int i=0;i<len;i++){ 
                    try {
                        list1.add(jsonArray1.get(i).toString());
                        globals.setList(list1);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                  } 
                } 
               /* Redrwawing the view */
                 adapter.clear();
                 adapter.addAll(list);      
                 Dialog.dismiss();
                 globals.setLoaded(true);
             }
    
        }
    
        /*This method opens the new activity - TopJokesBody when a joke name from the list is clicked*/
        public void openJokeBody(View view) {
            Intent intent = new Intent(this, AllJokesBody.class);
            startActivity(intent);
        }   
    
    }
    

    以下是截图: enter image description here

    您是否遇到过同样的问题?我真的无法发现我的错误,即使它是一个小错误。

    请给我一个线索!

1 个答案:

答案 0 :(得分:2)

关于你的第二个问题: 它不是您的应用,它是模拟器。我认为您正在使用硬件(视频)加速?

不要担心,您可以过滤这些消息,以免它们出现在logcat中。可以在以下帖子中找到更多信息:PhoneGap Eclipse Issue - eglCodecCommon glUtilsParamSize: unknow param errors