无法加载memtrack模块logcat的错误 [英] Couldn't load memtrack module Logcat Error

查看:14119
本文介绍了无法加载memtrack模块logcat的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误无法加载memtrack模块(没有这样的文件或目录)      加载失败memtrack模块:-2 在运行时

I am getting an error Couldn't load memtrack module (No such file or directory) failed to load memtrack module: -2 at run time.

堆栈跟踪错误:

 E/SoundPool(1280)       : error loading /system/media/audio/ui/Effect_Tick.ogg 
 E/SoundPool(1280)       : error loading /system/media/audio/ui/KeypressStandard.ogg       
 E/SurfaceFlinger(931)   : glCheckFramebufferStatusOES error 733995180
 E/memtrack(1873)        : Couldn't load memtrack module (No such file or directory)
 E/android.os.Debug(1873): failed to load memtrack module: -2
 E/libEGL(931)           : called unimplemented OpenGL ES API
 E/libEGL(931)           : called unimplemented OpenGL ES API
 E/libEGL(931)           : called unimplemented OpenGL ES API
 E/libEGL(931)           : called unimplemented OpenGL ES API
 E/SurfaceFlinger(931)   : glCheckFramebufferStatusOES error 733995180
 E/SurfaceFlinger(931)   : got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
 E/libEGL(931)           : called unimplemented OpenGL ES API
 E/libEGL(931)           : called unimplemented OpenGL ES API

清单:

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.hive"
    android:versionCode="1"
    android:versionName="1.0" 
    >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19" />

<uses-permission android:name="android.permission.INTERNET"/>
 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" android:name="com.sit.gems.app.GemsApplication"
        android:theme="@style/AppTheme" >

    <activity
            android:name="com.sit.gems.activity.SplashActivity"
            android:label="@string/app_name" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.sit.gems.activity.HomeActivity" android:screenOrientation="portrait"></activity>
    </application>

</manifest>

SplashActivity.java:

package com.sit.gems.activity;

import com.example.hive.R;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;


public class SplashActivity extends FragmentActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout_home);
        startActivity(new Intent(SplashActivity.this,HomeActivity.class));
        SplashActivity.this.finish();
    }

}

layout_home.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TabHost
        android:id="@android:id/tabhost"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" >

            <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_above="@android:id/tabs" >

                <FrameLayout
                    android:id="@+id/tab_home"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" />

                <FrameLayout
                    android:id="@+id/tab_video"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" />

                <FrameLayout
                    android:id="@+id/tab_audio"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" >
                </FrameLayout>

                <FrameLayout
                    android:id="@+id/tab_blog"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" >
                </FrameLayout>

                <FrameLayout
                    android:id="@+id/tab_gal"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" >
                </FrameLayout>

                <FrameLayout
                    android:id="@+id/tab_more"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" >
                </FrameLayout>
            </FrameLayout>

            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:background="@drawable/bottom_bar"
                android:divider="@null" />

            <!-- android:background="#d8e49c" -->
        </RelativeLayout>
    </TabHost>

</LinearLayout>

输出:

最后,它会显示空白屏幕。

Finally it displays the blank screen.

有人知道如何解决这些堆栈跟踪error.Thanks提前。

Anybody know how to solve these stacktrace error.Thanks in advance.

推荐答案

有关无法加载memtrack模块错误,很明显,你可以阅读的链接问题上述评论,结果是:。[...]与负载{}一些硬件模块问题,这可能是是与GPU的支持,SD卡的处理,基本上什么

For Couldn't load memtrack module error, apparently, as you can read on the question linked in comments above, results to be: "[...] a problem with loading {some} hardware module. This could be something to do with GPU support, sdcard handling, basically anything."

然后,称为未实现的OpenGL ES API 表示的的仿真器不支持GL2 的。

此外,你有你的清单里面的一些奇怪的包名称:

Also, you have some strange package names inside your manifest:

  • 包=com.example.hive&LT;舱单&GT;
  • 安卓名=com.sit.gems.app.GemsApplication&lt;应用&GT;
  • 安卓名=com.sit.gems.activity&LT;活性GT;
  • package="com.example.hive" for <manifest>
  • android:name="com.sit.gems.app.GemsApplication" for <application>
  • android:name="com.sit.gems.activity" for <activity>

如你所知,这几样东西没有prevent你的应用程序来显示。但是,对于更好地使用和几件事情,也许这将得到解决:

As you know, these kind of things do not prevent your app to be displayed. But for better using and with few things, maybe this will be resolved:

1 - 请尝试使用其他仿真,甚至在真实设备..也许你的memtrack模块是关系到你的模拟器。因此,它变成的运行配置的,不要忘了更改你的API就可以了。

1- Try with other emulators, and even on real devices.. maybe your "memtrack module" is related to your emulator. So change it into "Run configuration", don't forget to change your API on it too.

2 - 把你的活动内同一封装,并没有设置一个不同的包名称为您的应用程序标记。事情是这样的:

2- Put your Activities inside a same package and don't set a different package name to your application tag. Something like this:

<!-- set your general package -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.sit.gems.activity"
    android:versionCode="1"
    android:versionName="1.0" >

    <!-- don't set a package name here -->
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <!-- then, set your activities -->
        <activity
            android:name="com.sit.gems.activity.SplashActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.sit.gems.activity.HomeActivity"
            android:screenOrientation="portrait" >
        </activity>
    </application>
</manifest>  


3 - 同时,对于的OpenGl ,我再说一遍,这是不是一个错误,但声明。你应该能够在你的清单(你可以阅读这个答案如果你使用GLSurfaceView里面的 HomeActivity ,它可以帮助你):


3- Also, for OpenGl, I repeat, it's not an error but a statement. You should enable it in your manifest (you can read this answer if you're using GLSurfaceView inside HomeActivity, it might help you):

<uses-feature android:glEsVersion="0x00020000"></uses-feature>  
// or
<uses-feature android:glEsVersion="0x00010001" android:required="true" />


4 - ,然后,你应该设置另一个布局中您的 SplashScreenActivity 因为你没有使用 TabHost 这不是一个节约资源的方式。设置布局不同的东西,比如你的应用程序的名字或你的图标:


4- And then, you should set another layout inside your SplashScreenActivity because you're not using the TabHost and this is not a save resources way. Set a layout with something different, like your app name or your icon:

// inside SplashScreen class
setContentView(R.layout.splash_screen);

// layout splash_screen.xml
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent" 
     android:gravity="center"
     android:text="@string/appname" />  


5 - 最后,我不明白清楚您的 SplashScreenActivity 的目的。它集内容直接查看和完成它。这是没用的。正如它的名字是闪屏的,我以为你要启动您的 HomeActivity 之前显示的画面。因此,你应该这样做(的并没有设置 TabHost 布局的):


5- Finally, I don't understand clearly the purpose of your SplashScreenActivity. It sets a content view and directly finish it. This is useless. As its name is "Splash Screen", I assume that you want to display a screen before launching your HomeActivity. Therefore, you should do this (and don't set the TabHost layout):

// FragmentActivity is also useless here!
public class SplashActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // set your splash_screen layout
        setContentView(R.layout.splash_screen);

        // create a new Thread
        new Thread(new Runnable() {
            public void run() {
                try {
                    // sleep during 800ms
                    Thread.sleep(800);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                // start HomeActivity
                startActivity(new Intent(SplashActivity.this, HomeActivity.class));
                SplashActivity.this.finish();
            }
        }).start();
    }

}  

我希望这样的提示帮助你实现你想要的。
如果不是的话,让我知道我可以帮你。

I hope this kind of tips help you to achieve what you want.
If it's not the case, let me know how can I help you.

这篇关于无法加载memtrack模块logcat的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆