某相机提取整合后出现空指针的错误,帮忙看看。
附上附件:链接: https://pan.baidu.com/s/1PZKpVktcU6wVs9bbzzK9jQ 提取码: r1nj新人一枚,反编译整合后出现调用空指针。想问下像这类具体怎样判断问题出现在哪,毕竟代码是别人的。
下面是错误信息:想知道类似下面的错误是哪。定点onresume函数返空?还是布局没调用?还是什么?
09-27 16:16:50.619 E/AndroidRuntime(12575): FATAL EXCEPTION: main
09-27 16:16:50.619 E/AndroidRuntime(12575): Process: com.android.camera, PID: 12575
09-27 16:16:50.619 E/AndroidRuntime(12575): java.lang.RuntimeException: Unable to resume activity {com.android.camera/com.android.camera.CameraLauncher}: java.lang.NullPointerException: Attempt to invoke virtual method 'void cn.nubia.a.b.d()' on a null object reference
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3731)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3771)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2995)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.app.ActivityThread.-wrap11(Unknown Source:0)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1680)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.os.Handler.dispatchMessage(Handler.java:106)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.os.Looper.loop(Looper.java:164)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.app.ActivityThread.main(ActivityThread.java:6707)
09-27 16:16:50.619 E/AndroidRuntime(12575):at java.lang.reflect.Method.invoke(Native Method)
09-27 16:16:50.619 E/AndroidRuntime(12575):at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
09-27 16:16:50.619 E/AndroidRuntime(12575):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
09-27 16:16:50.619 E/AndroidRuntime(12575): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void cn.nubia.a.b.d()' on a null object reference
09-27 16:16:50.619 E/AndroidRuntime(12575):at cn.nubia.a.a.d(SourceFile:226)
09-27 16:16:50.619 E/AndroidRuntime(12575):at cn.nubia.camera.b.c(SourceFile:389)
09-27 16:16:50.619 E/AndroidRuntime(12575):at cn.nubia.camera.CameraActivity.n(SourceFile:408)
09-27 16:16:50.619 E/AndroidRuntime(12575):at cn.nubia.camera.activity.ActivityBase.onResume(SourceFile:362)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1357)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.app.Activity.performResume(Activity.java:7162)
09-27 16:16:50.619 E/AndroidRuntime(12575):at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3706)
09-27 16:16:50.619 E/AndroidRuntime(12575):... 10 more
还有这个反编译的代码A:
.method public d()V
.locals 0
.line 226
iget-object p0, p0, Lcn/nubia/a/a;->a:Lcn/nubia/a/b;
invoke-virtual {p0}, Lcn/nubia/a/b;->d()V 这个删除后可以进入但是没有后续的家族菜单
return-void
.end method
下面这个是B: A的d()v调用B的d()v,应该是没问题,但是为什么说B的d()v是空对象? B的d()v又调用了私有函数。有点想不明白。
.method public d()V
.locals 0
.line 855
invoke-direct {p0}, Lcn/nubia/a/b;->j()V
return-void
.end method
.method private j()V
.locals 6
.line 315
iget-object v0, p0, Lcn/nubia/a/b;->l:[Landroid/view/View;
if-eqz v0, :cond_3
iget-object v0, p0, Lcn/nubia/a/b;->l:[Landroid/view/View;
array-length v0, v0
if-nez v0, :cond_0
goto :goto_1
:cond_0
const/4 v0, 0x0
.line 319
:goto_0
iget-object v1, p0, Lcn/nubia/a/b;->l:[Landroid/view/View;
array-length v1, v1
if-ge v0, v1, :cond_2
.line 320
iget-object v1, p0, Lcn/nubia/a/b;->l:[Landroid/view/View;
aget-object v1, v1, v0
invoke-virtual {v1}, Landroid/view/View;->getTag()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcn/nubia/a/d;
.line 321
iget-object v2, p0, Lcn/nubia/a/b;->u:Lcn/nubia/a/e;
if-eqz v2, :cond_1
.line 322
iget-object v2, p0, Lcn/nubia/a/b;->l:[Landroid/view/View;
aget-object v2, v2, v0
invoke-virtual {v2}, Landroid/view/View;->getTag()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcn/nubia/a/d;
iget-object v3, p0, Lcn/nubia/a/b;->u:Lcn/nubia/a/e;
iget-object v1, v1, Lcn/nubia/a/d;->e:Lcn/nubia/a/c;
iget-object v4, p0, Lcn/nubia/a/b;->l:[Landroid/view/View;
aget-object v4, v4, v0
sget v5, Lcn/nubia/a/h$b;->item_text:I
.line 323
invoke-virtual {v4, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/TextView;
invoke-virtual {v3, v1, v4}, Lcn/nubia/a/e;->a(Lcn/nubia/a/c;Landroid/widget/TextView;)Z
move-result v1
iput-boolean v1, v2, Lcn/nubia/a/d;->d:Z
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_2
return-void
:cond_3
:goto_1
return-void
.end method
等大神降临吧,小白路过~! 没有大神帮忙看下么?{:1_904:}
页:
[1]