[2012-11-08 10:11:10 - BlueParking] Android Launch!
[2012-11-08 10:11:10 - BlueParking] adb is running normally.
[2012-11-08 10:11:10 - BlueParking] No Launcher activity found!
[2012-11-08 10:11:10 - BlueParking] The launch will only sync the application package on the device!
[2012-11-08 10:11:10 - BlueParking] Performing sync
[2012-11-08 10:11:10 - BlueParking] Automatic Target Mode: using device 'S5830bf8abc43'
[2012-11-08 10:11:10 - BlueParking] Uploading BlueParking.apk onto device 'S5830bf8abc43'
[2012-11-08 10:11:11 - BlueParking] Installing BlueParking.apk...
[2012-11-08 10:11:15 - BlueParking] Success!
[2012-11-08 10:11:15 - BlueParking] \BlueParking\bin\BlueParking.apk installed on device
[2012-11-08 10:11:15 - BlueParking] Done!
当我想安装我的应用程序时,我得到此控制台输出。但是,这是我的Android Manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.blueparking.manager"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-feature
android:name="android.hardware.location"
android:required="true" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
<application
android:name=".application.BlueParkingApplication"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar" >
<activity
android:name=".LoginActivity"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="androi.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:screenOrientation="portrait" />
<receiver
android:name="com.littlefluffytoys.littlefluffylocationlibrary.StartupBroadcastReceiver"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver
android:name="com.littlefluffytoys.littlefluffylocationlibrary.PassiveLocationChangedReceiver"
android:exported="true" />
</application>
</manifest>
如您所见,LoginActivity是Launcher Activity。谁能告诉我这里发生了什么?
答案 0 :(得分:1)
Manifest.xml似乎没问题。
该类的名称是LoginActivity?扩展活动?你正确加载布局吗?
如果你把LoginActivity的代码放在这里我们可以看到失败
答案 1 :(得分:0)
您需要在Manifest中指定Launcher Activity,就像那样
<activity android:name=".MainActivity" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
看起来您已经这样做了,因此您可以在编辑配置中的Android Studio中尝试选择“启动选项” - 默认活动。 我也有这个问题。
检查here以获取有关android
中活动的更多信息