gralloc_goldfish(634):没有GPU的仿真模拟器检测模拟器、gralloc_goldfish、GPU

2023-09-05 03:33:54 作者:胸膛丶浅醉丶

我使用的Andr​​oid SDK 4.0.3,我试图运行一个简单的程序中,我试图从一个页面切换到使用一个Intent另一个页面(通过传递意图对象为:意向意图=新的意图(getApplicationContext(),SecondActivity.class); startActivity(意向); )

[另外,我有3GB RAM]

但是当我运行程序,它提供了这样的事情在DDMS:

  1月一日至23日:58:23.892:D / gralloc_goldfish(634):仿真器没有检测GPU的仿真。

一月一号至23号:58:45.482:D / AndroidRuntime(634):关闭虚拟机

一月一号至23号:58:45.492:W / dalvikvm(634):主题ID = 1:螺纹退出与未捕获的异常(组= 0x409c01f8)

一月一号至23号:58:45.532:E / AndroidRuntime(634):致命异常:主要

一月一号至23号:58:45.532:E / AndroidRuntime(634):android.content.ActivityNotFoundException:
无法找到明确的活动类{com.example.actionbar_demo / com.example.actionbar_demo.SecondActivity};有你宣布你的Andr​​oidManifest.xml这个活动?

一月一号至23号:58:45.532:E / AndroidRuntime(634):在android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在android.app.Activity.startActivityForResult(Activity.java:3190)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在com.example.actionbar_demo.Actionbar_demoActivity $ 1.onClick(Actionbar_demoActivity.java:23)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在android.view.View.performClick(View.java:3511)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在android.view.View $ PerformClick.run(View.java:14105)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在android.os.Handler.handleCallback(Handler.java:605)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在android.os.Handler.dispatchMessage(Handler.java:92)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在android.os.Looper.loop(Looper.java:137)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在android.app.ActivityThread.main(ActivityThread.java:4424)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在java.lang.reflect.Method.invokeNative(本机方法)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在java.lang.reflect.Method.invoke(Method.java:511)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:784)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

一月一号至23号:58:45.532:E / AndroidRuntime(634):在dalvik.system.NativeStart.main(本机方法)

一月一号至23号:58:49.173:I /处理(634):发送信号。 PID:634 SIG:9
 

解决方案

如果你担心的:

 仿真器没有检测GPU的仿真。
 
曝微软 Win11 新增 WDDM 3.0 显示驱动模型 支持 WSL GUI

我也不会。鉴于网的粗略搜索打开它了不少,而且它不涉及到正在讨论的具体问题,我会说这只是一个迹象表明,你的模拟器根本不效仿GPU。它不可能是一个问题。

这是由事实支持它的一个的调试的信息(甚至不是一个警告,更遑论是错误),也有这么和你的实际问题之间有很大的42秒的差距。

在实际的问题似乎是由线指示:

  1月一日至23日:58:45.532:E / AndroidRuntime(634):
    android.content.ActivityNotFoundException:无法找到明确的活动
    类{com.example.actionbar_demo / com.example.actionbar_demo.SecondActivity};
    有你宣布你的Andr​​oidManifest.xml这个活动?
 

所以,我要问:?有无的你宣布这个活动在你的Andr​​oidManifest.xml

I am using android SDK 4.0.3 and I'm trying to run a simple program in which I'm trying to switch from one page to another page using an Intent (By passing intent object as: Intent intent = new Intent(getApplicationContext(),SecondActivity.class); startActivity(intent); )

[Also, I have 3GB RAM]

but when I run the program it gives something like this in DDMS:

01-23 01:58:23.892: D/gralloc_goldfish(634): Emulator without GPU emulation detected.

01-23 01:58:45.482: D/AndroidRuntime(634): Shutting down VM

01-23 01:58:45.492: W/dalvikvm(634): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)

01-23 01:58:45.532: E/AndroidRuntime(634): FATAL EXCEPTION: main

01-23 01:58:45.532: E/AndroidRuntime(634): android.content.ActivityNotFoundException: 
Unable to find explicit activity class {com.example.actionbar_demo/com.example.actionbar_demo.SecondActivity}; have you declared this activity in your AndroidManifest.xml?

01-23 01:58:45.532: E/AndroidRuntime(634):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)

01-23 01:58:45.532: E/AndroidRuntime(634):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)

01-23 01:58:45.532: E/AndroidRuntime(634):  at android.app.Activity.startActivityForResult(Activity.java:3190)

01-23 01:58:45.532: E/AndroidRuntime(634):  at com.example.actionbar_demo.Actionbar_demoActivity$1.onClick(Actionbar_demoActivity.java:23)

01-23 01:58:45.532: E/AndroidRuntime(634):  at android.view.View.performClick(View.java:3511)

01-23 01:58:45.532: E/AndroidRuntime(634):  at android.view.View$PerformClick.run(View.java:14105)

01-23 01:58:45.532: E/AndroidRuntime(634):  at android.os.Handler.handleCallback(Handler.java:605)

01-23 01:58:45.532: E/AndroidRuntime(634):  at android.os.Handler.dispatchMessage(Handler.java:92)

01-23 01:58:45.532: E/AndroidRuntime(634):  at android.os.Looper.loop(Looper.java:137)

01-23 01:58:45.532: E/AndroidRuntime(634):  at android.app.ActivityThread.main(ActivityThread.java:4424)

01-23 01:58:45.532: E/AndroidRuntime(634):  at java.lang.reflect.Method.invokeNative(Native Method)

01-23 01:58:45.532: E/AndroidRuntime(634):  at java.lang.reflect.Method.invoke(Method.java:511)

01-23 01:58:45.532: E/AndroidRuntime(634):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

01-23 01:58:45.532: E/AndroidRuntime(634):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

01-23 01:58:45.532: E/AndroidRuntime(634):  at dalvik.system.NativeStart.main(Native Method)

01-23 01:58:49.173: I/Process(634): Sending signal. PID: 634 SIG: 9

解决方案

If you're worried about the:

Emulator without GPU emulation detected.

I wouldn't be. Given that a cursory search of the net turns it up quite a bit, and it's not related to the specific problems being discussed, I'd say it's just an indication that your emulator simply doesn't emulate the GPU. It's unlikely to be a problem.

That's supported by the fact it's a debug message (not even a warning, let alone an error) and also that there's a big 42-second gap between that and your actual problem.

The actual problem seems to be indicated by the line:

01-23 01:58:45.532: E/AndroidRuntime(634):
    android.content.ActivityNotFoundException: Unable to find explicit activity
    class {com.example.actionbar_demo/com.example.actionbar_demo.SecondActivity};
    have you declared this activity in your AndroidManifest.xml?

So I have to ask: have you declared this activity in your AndroidManifest.xml?