【问题标题】:Android EGL-ERROR can not start activityAndroid EGL-ERROR 无法启动活动
【发布时间】:2013-08-14 09:54:52
【问题描述】:

我在打开新活动时遇到问题。应用程序关闭并且不会向用户显示任何错误。我将 Activity 的代码放在我调用的位置、应该接收调用的 Activity、清单和日志中。我调试了应用程序,但调试无法转到其他活动。

    //Here I do the call to other activity
    @Override
protected void onPostExecute(String unused) {
    if (pDialog != null) {
        Intent i = new Intent(context, RedesActivity.class);
        i.putExtra("redes", redes);
        i.putExtra("token", token);
        i.putExtra("iDUsuario", idUsuario);
        i.putExtra("nombreUsuario", usuario);
        startActivity(i);
        pDialog.dismiss();
        finish();
    }
}


    //The activity that receive the call (RedesActivity)
    @Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Quitamos el encabezado de la app
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    .....

表现形式

    <activity
        android:name="com.xxxxxx.MainActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.xxxxxxxx.RedesActivity"
        android:label="@string/title_activity_redes" 
        android:configChanges="orientation|keyboardHidden|screenSize">
    </activity>

如果我运行应用程序,应用程序退出并且不显示错误,但如果我调试我可以看到

    08-14 11:23:07.145: E/SurfaceTextureClient(22338):    ISurfaceTexture::setBufferCount(0) returned No such device
    08-14 11:23:07.940: I/Choreographer(22338): Skipped 485 frames!  The application may be doing too much work on its main thread.
    08-14 11:23:08.095: E/MaliEGL(22338): void __egl_platform_dequeue_buffer(egl_surface*):1099 [EGL-ERROR] failed to dequeue buffer from native window (0x40de0ad8); err = -19, buf = 0x0
    08-14 11:23:08.100: E/SurfaceTextureClient(22338): ISurfaceTexture::setBufferCount(0) returned No such device

有人可以帮忙吗?谢谢

【问题讨论】:

  • 显示更多崩溃详情
  • 尝试正确地给出代码......这不是提问的正确方式。
  • 请发布正确的代码。令人困惑

标签: android android-intent android-activity securityexception


【解决方案1】:

当应用未在清单中声明它正在使用的所需权限时,会发生安全异常。

看起来您正在使用 Internet 或读取 Wifi 状态,或者可能是某些权限,请检查您的日志猫,然后在您的清单中添加 Uses Permission 标签,例如:

 <uses-permission android:name="android.permission.REQUIRED_PERMISSION_HERE" />

【讨论】:

  • 谢谢,我拥有所有互联网权限。所以,我认为这不是问题
  • 也可以是其他权限。请确保您拥有清单中声明的​​所有必需权限。
  • 我有这个权限
  • 这没问题。在您的 Java 代码中,您是否正在使用任何需要权限的东西,但您错过了。
  • 您不再遇到任何安全异常了吗!! ?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-03-24
  • 1970-01-01
  • 2012-07-23
  • 1970-01-01
相关资源
最近更新 更多