0
我试图运行一个演示项目来实现小部件,它编译成功,但没有启动,也没有发现它安装在我的手机中。无法在设备上启动应用程序
我下面这个教程http://www.tutorialspoint.com/android/android_widgets.htm
A也本教程https://github.com/TechIsFun/android-widget-example,但得到了同样的问题。
我的控制台显示
[2014-11-23 11:01:30 - WidgetExample] Performing sync
[2014-11-23 11:01:30 - WidgetExample] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2014-11-23 11:01:34 - WidgetExample] Uploading WidgetExample.apk onto device '1C9E_9E18_MicromaxA111'
[2014-11-23 11:01:34 - WidgetExample] Installing WidgetExample.apk...
[2014-11-23 11:01:37 - WidgetExample] Success!
[2014-11-23 11:01:37 - WidgetExample] \WidgetExample\bin\WidgetExample.apk installed on device
[2014-11-23 11:01:37 - WidgetExample] Done!
我认为有一些问题清单文件?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.widgetexample"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<receiver
android:name="MyWidgetProvider"
android:icon="@drawable/ic_launcher"
android:label="Example Widget" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_info" />
</receiver>
</application>
</manifest>
1-尝试拔下设备并重新插入; 2-尝试重新启动设备; 3-尝试检查USB调试选项,然后再次检查它是否打开。请评论如果这些不起作用。 – 2014-11-23 05:40:19
manifest.xml中缺少主要启动程序活动 – Nepster 2014-11-23 07:18:37
如果找到答案,请关闭该问题。 – 2014-11-30 13:27:18