Android 安卓应用赢得';t在设备上启动
我已经使用Eclipse开发了一个Android应用程序,它可以在Android虚拟设备上完美运行,或者在我的智能手机上使用Eclipse+USB调试模式运行它 但是,当我使用sd卡上的签名apk文件在手机上安装应用程序并尝试启动时,会出现“未找到活动-lsp.workshop”错误,应用程序无法启动(lsp.workshop是应用程序包名称) AndroidManifest.xml文件是:Android 安卓应用赢得';t在设备上启动,android,apk,android-activity,Android,Apk,Android Activity,我已经使用Eclipse开发了一个Android应用程序,它可以在Android虚拟设备上完美运行,或者在我的智能手机上使用Eclipse+USB调试模式运行它 但是,当我使用sd卡上的签名apk文件在手机上安装应用程序并尝试启动时,会出现“未找到活动-lsp.workshop”错误,应用程序无法启动(lsp.workshop是应用程序包名称) AndroidManifest.xml文件是: <?xml version="1.0" encoding="utf-8"?> <man
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="lsp.workshop"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".TwitterLogin"
android:label="@string/app_name" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:scheme="twitter" />
<data android:host="log" />
</intent-filter>
</activity>
</application>
</manifest>
我做错了什么?谢谢当你正常启动一个应用程序时,模拟器和安装了调试器的android的行为会有所不同。计时不同(影响多线程和竞争条件),其他方面也可能受到影响 但可以肯定的是: 您是否在AndroidManifest.xml文件中列出了活动 拼写正确吗
如果这些都不是问题所在,那么您能否展示一些代码(如何启动活动?有意向?)以及清单文件?使用两个意向过滤器而不是一个解决了问题:
<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.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="twitter" android:host="log" />
</intent-filter>
导出apk时,请确保将其命名为-something.apk,即在导出应用程序时将“.apk”放在末尾(y)可能我遗漏了什么。为什么它没有命名为something.apk?lsp.workshop是包含我的源文件的包(src文件夹下的目录),而不是apk文件的名称,它实际上是somteting.apkOh。既然上面写着“未找到活动”,你确定你有.TwitterLogin吗?是的,我有TwitterLogin.java文件。它确实是在AVD上启动的。我已经用AndroidManifest.xml文件编辑了我的原始消息