现在刚开始学习android,下载deskclock源码在本地运行,编译通过,运行时挂了,跟了一下,挂在
刚进去时onCreate()函数里面的
try {
mGenieResources = getPackageManager().getResourcesForApplication(GENIE_PACKAGE_ID);
} catch (PackageManager.NameNotFoundException e) {
// no weather info available
Log.w(LOG_TAG, "Can't find "+GENIE_PACKAGE_ID+". Weather forecast will not be available.");
}
请各位大虾们指教,多谢了
刚进去时onCreate()函数里面的
try {
mGenieResources = getPackageManager().getResourcesForApplication(GENIE_PACKAGE_ID);
} catch (PackageManager.NameNotFoundException e) {
// no weather info available
Log.w(LOG_TAG, "Can't find "+GENIE_PACKAGE_ID+". Weather forecast will not be available.");
}
请各位大虾们指教,多谢了
解决方案 »
- flex中sqlite查询
- 关于Android应用tawkon的UI实现
- 跪求大神解决soap获取序列化对象方法!
- apk反编译出错
- 请教:同一个线程内,可以用sendMessage,handleMessage这样的方式么
- 求救:把android手机设置为热点(AP)的原理
- 问一个比较弱智的问题
- 应用移到sd卡
- Android 读取/data/data/ 下的文件 Permission Denied
- 谁能帮我看看怎么正常编译这个开源项目,omni-notes(地址里面有)
- 关于User-Agent ,关于XML解析!在线等~~~
- scrollvew当内容不足 不显示scrollview 怎么捕捉setOnTouchListener 事件?
08-31 13:10:32.246: ERROR/AndroidRuntime(463): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.deskclock/com.android.deskclock.DeskClock}: java.lang.RuntimeException: native typeface cannot be made
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.os.Handler.dispatchMessage(Handler.java:99)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.os.Looper.loop(Looper.java:130)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.app.ActivityThread.main(ActivityThread.java:3683)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at java.lang.reflect.Method.invokeNative(Native Method)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at java.lang.reflect.Method.invoke(Method.java:507)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at dalvik.system.NativeStart.main(Native Method)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): Caused by: java.lang.RuntimeException: native typeface cannot be made
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.graphics.Typeface.<init>(Typeface.java:147)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.graphics.Typeface.createFromAsset(Typeface.java:121)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at com.android.deskclock.DigitalClock.onFinishInflate(DigitalClock.java:117)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.view.LayoutInflater.rInflate(LayoutInflater.java:631)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.view.LayoutInflater.parseInclude(LayoutInflater.java:707)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.view.LayoutInflater.rInflate(LayoutInflater.java:619)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.app.Activity.setContentView(Activity.java:1657)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at com.android.deskclock.DeskClock.initViews(DeskClock.java:691)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at com.android.deskclock.DeskClock.onCreate(DeskClock.java:867)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
08-31 13:10:32.246: ERROR/AndroidRuntime(463): ... 11 more
08-31 13:10:32.255: WARN/ActivityManager(68): Force finishing activity com.android.deskclock/.DeskClock
08-31 13:10:32.775: WARN/ActivityManager(68): Activity pause timeout for HistoryRecord{407aa7f8 com.android.deskclock/.DeskClock}失败就提示了deskclock has stopped unpectedly,please try again
不明白什么原因
protected void onCreate(Bundle icicle) {
super.onCreate(icicle); mRNG = new Random();
try {
mGenieResources = getPackageManager().getResourcesForApplication(GENIE_PACKAGE_ID);
} catch (PackageManager.NameNotFoundException e) {
// no weather info available
Log.w(LOG_TAG, "Can't find "+GENIE_PACKAGE_ID+". Weather forecast will not be available.");
}
initViews();
}