从GitHub上考的源码,编译没错,一运行就闪退,不知道为什么。
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.cniao5.app36kr_cnk, PID: 4777
java.lang.NullPointerException: Attempt to invoke virtual method ‘org.jsoup.select.Elements org.jsoup.nodes.Element.select(java.lang.String)’ on a null object reference
at com.cniao5.app36kr_cnk.biz.HeadDataManager.getHeadBeans(HeadDataManager.java:31)
at com.cniao5.app36kr_cnk.fragment.HomeFragment$1.requestSuccess(HomeFragment.java:128)
at com.cniao5.app36kr_cnk.utils.OkhttpManager
5.
r
u
n
(
O
k
h
t
t
p
M
a
n
a
g
e
r
.
j
a
v
a
:
222
)
a
t
a
n
d
r
o
i
d
.
o
s
.
H
a
n
d
l
e
r
.
h
a
n
d
l
e
C
a
l
l
b
a
c
k
(
H
a
n
d
l
e
r
.
j
a
v
a
:
873
)
a
t
a
n
d
r
o
i
d
.
o
s
.
H
a
n
d
l
e
r
.
d
i
s
p
a
t
c
h
M
e
s
s
a
g
e
(
H
a
n
d
l
e
r
.
j
a
v
a
:
99
)
a
t
a
n
d
r
o
i
d
.
o
s
.
L
o
o
p
e
r
.
l
o
o
p
(
L
o
o
p
e
r
.
j
a
v
a
:
193
)
a
t
a
n
d
r
o
i
d
.
a
p
p
.
A
c
t
i
v
i
t
y
T
h
r
e
a
d
.
m
a
i
n
(
A
c
t
i
v
i
t
y
T
h
r
e
a
d
.
j
a
v
a
:
6669
)
a
t
j
a
v
a
.
l
a
n
g
.
r
e
f
l
e
c
t
.
M
e
t
h
o
d
.
i
n
v
o
k
e
(
N
a
t
i
v
e
M
e
t
h
o
d
)
a
t
c
o
m
.
a
n
d
r
o
i
d
.
i
n
t
e
r
n
a
l
.
o
s
.
R
u
n
t
i
m
e
I
n
i
t
5.run(OkhttpManager.java:222) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit
5.run(OkhttpManager.java:222)atandroid.os.Handler.handleCallback(Handler.java:873)atandroid.os.Handler.dispatchMessage(Handler.java:99)atandroid.os.Looper.loop(Looper.java:193)atandroid.app.ActivityThread.main(ActivityThread.java:6669)atjava.lang.reflect.Method.invoke(NativeMethod)atcom.android.internal.os.RuntimeInitMethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)