草庐IT

android - 奇怪的 Android 错误 : **** ERROR unknown type 0x73736572 (glSizeof, 72)

coder 2023-12-04 原文

我面临着一个非常奇怪的情况,老实说,我很快就会哭出来。

我创建了一个 View - 在底部显示一个 admob 横幅。对我来说一切似乎都很好,但我注意到了

  1. 显示 Activity 需要很长时间
  2. 整个 logcat 控制台上循环出现奇怪的错误。

这里的错误(重复一百次):

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)

当我按下后退按钮并退出 Activity 时,一切都停止了。

这是我的布局:

<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);
    }   

}

截图如下:

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

请给我一个线索!

最佳答案

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

不用担心,您可以过滤这些消息,使它们不会出现在 logcat 中。可以在这篇文章中找到更多信息:PhoneGap Eclipse Issue - eglCodecCommon glUtilsParamSize: unknow param errors

关于android - 奇怪的 Android 错误 : **** ERROR unknown type 0x73736572 (glSizeof, 72),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22747948/

有关android - 奇怪的 Android 错误 : **** ERROR unknown type 0x73736572 (glSizeof, 72)的更多相关文章

  1. 电脑0x0000001A蓝屏错误怎么U盘重装系统教学 - 2

      电脑0x0000001A蓝屏错误怎么U盘重装系统教学分享。有用户电脑开机之后遇到了系统蓝屏的情况。系统蓝屏问题很多时候都是系统bug,只有通过重装系统来进行解决。那么蓝屏问题如何通过U盘重装新系统来解决呢?来看看以下的详细操作方法教学吧。  准备工作:  1、U盘一个(尽量使用8G以上的U盘)。  2、一台正常联网可使用的电脑。  3、ghost或ISO系统镜像文件(Win10系统下载_Win10专业版_windows10正式版下载-系统之家)。  4、在本页面下载U盘启动盘制作工具:系统之家U盘启动工具。  U盘启动盘制作步骤:  注意:制作期间,U盘会被格式化,因此U盘中的重要文件请注

  2. 安卓apk修改(Android反编译apk) - 2

    最近因为项目需要,需要将Android手机系统自带的某个系统软件反编译并更改里面某个资源,并重新打包,签名生成新的自定义的apk,下面我来介绍一下我的实现过程。APK修改,分为以下几步:反编译解包,修改,重打包,修改签名等步骤。安卓apk修改准备工作1.系统配置好JavaJDK环境变量2.需要root权限的手机(针对系统自带apk,其他软件免root)3.Auto-Sign签名工具4.apktool工具安卓apk修改开始反编译本文拿Android系统里面的Settings.apk做demo,具体如何将apk获取出来在此就不过多介绍了,直接进入主题:按键win+R输入cmd,打开命令窗口,并将路

  3. ruby-on-rails - 如何解决#<Book::ActiveRecord_Relation:0x007fb709a6a8c0> 的未定义方法 `to_key'? - 2

    我遇到了未定义方法`to_key'的问题这是我的books_controller.rbclassBooksController和我的索引页如下。index.html.erb......现在当我要访问索引页面时出现如下错误。undefinedmethod`to_key'for# 最佳答案 index通常返回一个集合。事实上,您的Controller符合要求。但是,您的View试图为其定义一个表单。正如您所发现的,这不会成功。表单适用于实体,而不适用于集合。该错误在您看来以及您希望如何处理index。

  4. ruby-on-rails - Rspec - Controller 测试错误 - Paperclip::AdapterRegistry::NoHandlerError: 找不到 "#<File:0x531beb0>"的处理程序 - 2

    我如下询问了我的Rspec测试。Rspec-RuntimeError:Calledidfornil,whichwouldmistakenlybe4在相同的代码上(“items_controller.rb”的Rspec测试),我试图对“PUTupdate”进行测试。但是我收到错误消息“Paperclip::AdapterRegistry::NoHandlerError:找不到“#”的处理程序。我的Rspec测试如下。老实说,我猜这次失败的原因是“let(:valid_attributes)”上的“photo”=>File.new(Rails.root+'app/assets/images

  5. ruby-on-rails - `method_missing':#<Rails::Application::Configuration:0x00> 的未定义方法 `action_mailer' - 2

    我正在构建一个Rails应用程序并且使用的是Rails4.0.1。我有一个错误,并注意到它在3个月前被称为rails上的一个错误,所以我决定:捆绑更新并获得rails4.0.3这样做之后,测试和服务器都不会启动,并且会抛出错误:gems/railties-4.0.3/lib/rails/railtie/configuration.rb:95:in`method_missing':undefinedmethod`action_mailer'for#(NoMethodError)目前我在config/environments/*中注释掉了action_mailer行,但最好能找到一个真正的

  6. ruby-on-rails - #<ProjectsController :0x007faead1853e0> 的未定义方法 `user_signed_in?' - 2

    我想用RubyonRails进行身份验证,每个用户都有自己的帐户。但是现在我得到了这个错误:undefinedmethoduser_signed_in?for#有人能帮帮我吗?代码如下:完整跟踪:app/controllers/projects_controller.rb:69:in`require_login'activesupport(3.2.3)lib/active_support/callbacks.rb:418:in`_run__2505248868868045404__process_action__114470166732456289__callbacks'actives

  7. Android Studio开发之使用内容组件Content获取通讯信息讲解及实战(附源码 包括添加手机联系人和发短信) - 2

    运行有问题或需要源码请点赞关注收藏后评论区留言一、利用ContentResolver读写联系人在实际开发中,普通App很少会开放数据接口给其他应用访问。内容组件能够派上用场的情况往往是App想要访问系统应用的通讯数据,比如查看联系人,短信,通话记录等等,以及对这些通讯数据及逆行增删改查。首先要给AndroidMaifest.xml中添加响应的权限配置 下面是往手机通讯录添加联系人信息的例子效果如下分成三个步骤先查出联系人的基本信息,然后查询联系人号码,再查询联系人邮箱代码 ContactAddActivity类packagecom.example.chapter07;importandroid

  8. Android 10.0 设置默认launcher后安装另外launcher后默认Launcher失效的功能修复 - 2

    1.前言 在10.0的系统rom定制化开发中,在系统中有多个launcher的时候,会在开机进入launcher的时候弹窗launcher列表,让用户选择进入哪个launcher,这样显得特别的不方便所以产品开发中,要求用RoleManager的相关api来设置默认Launcher,但是在设置完默认Launcher以后,在安装一款Launcher的时候,默认Launcher就会失效,在系统设置的默认应用中Launcher选项就为空,点击home键的时候会弹出默认Launcher列表,让选择进入哪个默认Launcher.所以需要从安装Launcher的流程来分析相关的设置。来解决问题设置默认La

  9. AiBote 2022 新研发的自动化框架,支持 Android 和 Windows 系统。速度非常快 - 2

    Ai-Bot基于流行的Node.js和JavaScript语言的一款新自动化框架,支持Windows和Android自动化。1、Windowsxpath元素定位算法支持支持Windows应用、.NET、WPF、Qt、Java和Electron客户端程序和ie、edgechrome浏览器2、Android支持原生APP和H5界面,元素定位速度是appium十倍,无线远程自动化操作多台安卓设备3、基于opencv图色算法,支持找图和多点找色,1080*2340全分辨率找图50MS以内4、内置免费OCR人工智能技术,无限制获取图片文字和找字功能。5、框架协议开源,除官方node.jsSDK外,用户可

  10. Android Gradle 7.1+新版本依赖变化 - 2

    前一段时间由于工作需要把可爱的小雪狐舍弃了,找到了小蜜蜂。但是新版本的小蜜蜂出现了很多和旧版本不一样的位置。1.功能位置迁移,原来在工程build.gradle的buildscript和allprojects移动至setting.gradle并改名为pluginManagement和dependencyResolutionManagement。里面的东西依旧可以按照原来的copy过来。pluginManagement{repositories{gradlePluginPortal()google()mavenCentral()}}dependencyResolutionManagement{r

随机推荐