【问题标题】:Android: SDK and Emulator totally bugged... What could be the problem?Android:SDK 和 Emulator 完全被窃听......可能是什么问题?
【发布时间】:2011-01-25 05:37:09
【问题描述】:

我的模拟器和 SDK 包在一小时前运行良好。我尝试编辑清单文件和 BAM 中的代码!突然之间,当我运行我的应用程序时,模拟器冻结了,有时需要 Ctrl + Alt + Delete,当它自行解冻时,应用程序甚至不显示。控制台日志看起来不错,但我从 Logcat 获得了一些 WIERD 读数......不确定它们是否正常。帮帮我?

实际上,从头开始......控制台日志中也发生了奇怪的事情......

[2011-01-24 23:25:44 - UnicornTest] ------------------------------
[2011-01-24 23:25:44 - UnicornTest] Android Launch!
[2011-01-24 23:25:44 - UnicornTest] adb is running normally.
[2011-01-24 23:25:44 - UnicornTest] No Launcher activity found!
[2011-01-24 23:25:44 - UnicornTest] The launch will only sync the application package on the device!
[2011-01-24 23:25:44 - UnicornTest] Performing sync
[2011-01-24 23:25:44 - UnicornTest] Automatic Target Mode: Preferred AVD 'Koneko' is available on emulator 'emulator-5554'
[2011-01-24 23:25:44 - UnicornTest] WARNING: Application does not specify an API level requirement!
[2011-01-24 23:25:44 - UnicornTest] Device API version is 9 (Android 2.3)
[2011-01-24 23:25:46 - UnicornTest] Application already deployed. No need to reinstall.
[2011-01-24 23:25:46 - UnicornTest] \UnicornTest\bin\UnicornTest.apk installed on   device
[2011-01-24 23:25:46 - UnicornTest] Done!

Android 清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.unicorn.test.whee"
  android:versionCode="1"
  android:versionName="1.0">
  <application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:label="@string/app_name" android:enabled="true"      android:name="SplashScreenPear">


    </activity>



 </application>


 </manifest> 

我觉得好像在某个我看不到的地方存在一些完全明显的错误...我知道如果您感染了病毒,GIMP 会执行类似冻结的操作,但我只是进行了扫描,但什么也没出现...提前抱歉。

【问题讨论】:

    标签: android eclipse emulation manifest freeze


    【解决方案1】:

    你犯了一个错误。您尚未在清单文件中将任何活动声明为启动器活动,因此您的应用正在运行,但模拟器找不到任何要启动的活动,因此它不显示任何内容。

    只需更改以下内容:

    <activity android:name=".SplashScreenPear"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    

    而不是

    <application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:label="@string/app_name" android:enabled="true"      android:name="SplashScreenPear">
    
    
    </activity>
    

    永远记住:如上所述将您的一项活动声明为启动器。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-27
      • 2011-10-18
      • 2015-01-13
      • 2019-04-20
      相关资源
      最近更新 更多