安卓新建了项目,eclipse运行的是src目录下的main.java而不是该目录下我建立的MySurfaceView.java
AndroidLaunch![2013-04-2516:57:05-CanvasProject001]adbisrunningnormally.[2013-04-2516...
Android Launch!
[2013-04-25 16:57:05 - CanvasProject001] adb is running normally.
[2013-04-25 16:57:05 - CanvasProject001] Performing com.nust.canvasproject001.Main activity launch
[2013-04-25 16:57:05 - CanvasProject001] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'myandroid01'
[2013-04-25 16:57:05 - CanvasProject001] Uploading CanvasProject001.apk onto device 'emulator-5554'
[2013-04-25 16:57:06 - CanvasProject001] Installing CanvasProject001.apk...
[2013-04-25 16:57:18 - CanvasProject001] Success!
[2013-04-25 16:57:18 - CanvasProject001] Starting activity com.nust.canvasproject001.Main on device emulator-5554
[2013-04-25 16:57:21 - CanvasProject001] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.nust.canvasproject001/.Main } 展开
[2013-04-25 16:57:05 - CanvasProject001] adb is running normally.
[2013-04-25 16:57:05 - CanvasProject001] Performing com.nust.canvasproject001.Main activity launch
[2013-04-25 16:57:05 - CanvasProject001] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'myandroid01'
[2013-04-25 16:57:05 - CanvasProject001] Uploading CanvasProject001.apk onto device 'emulator-5554'
[2013-04-25 16:57:06 - CanvasProject001] Installing CanvasProject001.apk...
[2013-04-25 16:57:18 - CanvasProject001] Success!
[2013-04-25 16:57:18 - CanvasProject001] Starting activity com.nust.canvasproject001.Main on device emulator-5554
[2013-04-25 16:57:21 - CanvasProject001] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.nust.canvasproject001/.Main } 展开
1个回答
展开全部
到你的manifest文件中,把你想要运行的Activity改成下面这样就行了
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
更多追问追答
追问
mainfest.xml就是上面的代码,没有其它变化。
小白一枚,按照教程编写代码,我的就不行,教程源码运行就可以。。。
追答
有几个Activity就得在Manifest中加入几个,你想让程序开始时候运行哪个,就写成
action android:name="android.intent.action.MAIN" ,其他的就写成Activity2那样
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询