无法启动活动ComponentInfo - android.view.InflateException:二进制XML文件行#25

时间:2013-02-15 09:11:12

标签: android android-intent android-emulator

我正在制作一个应用程序,其中我向用户提供首选项,在这里我给出了一个选项,即关于Floogoo应用程序

现在我希望每当用户点击关于Floogoo App 选项时,需要重定向到WebURL,如:www.floogoo.com

现在我希望每当用户点击关于Floogoo App>它调用OpenURL类

和在Manifest.xml中我已经给出了PreferenceWindow类

得到如下错误:不幸的是App停止了

无法启动活动ComponentInfo {com.chr.tatu.sample.friendslist / com.chr.tatu.sample.friendslist.contacts.PreferenceWindow}:android.view.InflateException:二进制XML文件行#25:错误输出类com.chr.tatu.sample。 friendslist.contacts.TimePickerPreferences

ScreenShot已经使用它进行测试:

  <com.chr.tatu.sample.friendslist.contacts.TimePickerPreference
    android:defaultValue=""
    android:key="about"
    android:summary="Summar"
    android:title="About App" />

1 个答案:

答案 0 :(得分:0)

更改您的代码。

Intent browserIntent = 
    new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
    startActivity(browserIntent);

Uri uri = Uri.parse("http://www.google.com");
Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri );
startActivity(browserIntent);

让我知道。