gpt4 book ai didi

java - Android 应用程序错误 - 很遗憾,您的应用程序已停止

转载 作者:行者123 更新时间:2023-11-29 20:27:22 25 4
gpt4 key购买 nike

我正在使用 eclipse 进行 android 应用程序开发。当我使用模拟器运行我的代码时,它说很遗憾你的应用程序已停止。在日志猫中,它说“低内存 killer ”。如何解决这个问题?谁能回答一下..

这是我的应用程序加载时出现的堆栈跟踪。

  09-03 15:54:39.109: E/SysUtils(1892): ApplicationContext is null in ApplicationStatus
09-03 15:54:40.027: E/libEGL(1892): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
09-03 15:54:40.027: E/libEGL(1892): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
09-03 15:54:40.027: E/chromium(1892): [ERROR:gl_surface_egl.cc(327)] No suitable EGL configs found.
09-03 15:54:40.027: E/chromium(1892): [ERROR:gl_surface_android.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
09-03 15:54:40.027: E/chromium(1892): [ERROR:browser_main_loop.cc(698)] GLSurface::InitializeOneOff failed
09-03 15:54:40.396: E/DataReductionProxySettingListener(1892): No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
09-03 15:54:44.051: A/chromium(1892): [FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0)
09-03 15:54:44.051: A/chromium(1892): --------- beginning of crash
09-03 15:54:44.052: A/libc(1892): Fatal signal 6 (SIGABRT), code -6 in tid 1972 (GpuThread)
09-03 15:57:17.517: E/SysUtils(2115): ApplicationContext is null in ApplicationStatus
09-03 15:57:17.598: E/libEGL(2115): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
09-03 15:57:17.598: E/libEGL(2115): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
09-03 15:57:17.598: E/chromium(2115): [ERROR:gl_surface_egl.cc(327)] No suitable EGL configs found.
09-03 15:57:17.598: E/chromium(2115): [ERROR:gl_surface_android.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
09-03 15:57:17.598: E/chromium(2115): [ERROR:browser_main_loop.cc(698)] GLSurface::InitializeOneOff failed
09-03 15:57:17.674: E/DataReductionProxySettingListener(2115): No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
09-03 15:57:18.141: A/chromium(2115): [FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0)
09-03 15:57:18.141: A/libc(2115): Fatal signal 6 (SIGABRT), code -6 in tid 2155 (GpuThread)

主要 Activity 文件

package com.example.login4;

import android.app.Activity;
import android.os.Bundle;

import android.webkit.WebView;

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

WebView ourBrow = (WebView) findViewById(R.id.wvBrowser);
ourBrow.loadUrl("http://www.000webhost.com//");
}


}

XML文件

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"

tools:context="com.example.login4.MainActivity" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />

<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/wvBrowser"/>

</RelativeLayout>

最佳答案

这是因为你的图像有很大的内存。为避免此错误,请将图像移动到 xxhdpi 文件夹。

关于java - Android 应用程序错误 - 很遗憾,您的应用程序已停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32367999/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com