下面是从小部件启动应用程序的代码......它不起作用,有什么建议吗?谢谢你
package com.acd.widget;
import android.appwidget.AppWidgetProvider;
import android.content.Intent;
public class AcdWidget extends AppWidgetProvider {
String packageName = "air.kwd.acdsummit";
String className = "com.package.MainActivity";
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName(packageName, className));
startActivity(intent);
}