我正在使用butterknife 8.0.1,但是nullpointerexception正在出现.
这行在我的build.grade文件中:
compile 'com.jakewharton:butterknife:8.0.1'
这是我的Main Class:(我正确地写了包括)
import butterknife.BindView;
import butterknife.ButterKnife;
public class MainActivity extends BaseActivity {
@BindView(R.id.MainScreenTextView) TextView mainText;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
**mainText.setText("Butter knife is working fine");**
}
Run Code Online (Sandbox Code Playgroud)
这是MainActivity.xml:
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/MainScreenTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="This is the Main Screen"
android:textColor="#000000"
android:background="#666666"
android:padding="5dp"
android:textSize="20dp"/>
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end" …Run Code Online (Sandbox Code Playgroud) 我需要查看我的androidTV应用程序发出的后端https请求,但是,由于呼叫是"https"呼叫,我需要安装一个查尔斯证书(在我的androidTV上)以允许查尔斯解密它们.
如果有人知道如何在androidTV上安装证书,请告诉我.
非常感谢!
Facebook 直播视频不可用于移动网络(根据 facebook 的文档),但有没有办法使用 VideoView 观看 Facebook 直播视频?
谢谢