当我按下主要活动上的按钮时,我正在创建android应用程序并获取此堆栈。和应用程序崩溃。它向我展示了一些关于Bitmap的东西,但我没有在我的应用程序中使用Bitmap。我正在使用Glide加载图片。
android.steerme.pk.steerme_android_application E/AndroidRuntime: FATAL EXCEPTION: main
Process: android.steerme.pk.steerme_android_application, PID: 13553
java.lang.RuntimeException: Unable to destroy activity {android.steerme.pk.steerme_android_application/danyal.steerme.pk.steerme_android_application.activities.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3773)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3791)
at android.app.ActivityThread.access$1400(ActivityThread.java:166)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1336)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5584)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:698)
at com.pkmmte.view.CircularImageView.refreshBitmapShader(CircularImageView.java:341)
at com.pkmmte.view.CircularImageView.invalidate(CircularImageView.java:262)
at android.widget.ImageView.setImageDrawable(ImageView.java:437)
at com.bumptech.glide.request.target.ImageViewTarget.onLoadCleared(ImageViewTarget.java:70)
at com.bumptech.glide.request.GenericRequest.clear(GenericRequest.java:323)
at com.bumptech.glide.manager.RequestTracker.clearRequests(RequestTracker.java:94)
at com.bumptech.glide.RequestManager.onDestroy(RequestManager.java:221)
at com.bumptech.glide.manager.ActivityFragmentLifecycle.onDestroy(ActivityFragmentLifecycle.java:64)
at com.bumptech.glide.manager.SupportRequestManagerFragment.onDestroy(SupportRequestManagerFragment.java:147)
at android.support.v4.app.Fragment.performDestroy(Fragment.java:2426)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1437)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1523)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1585)
at android.support.v4.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:2869)
at android.support.v4.app.FragmentController.dispatchDestroy(FragmentController.java:271)
at android.support.v4.app.FragmentActivity.onDestroy(FragmentActivity.java:390)
at android.support.v7.app.AppCompatActivity.onDestroy(AppCompatActivity.java:212)
at android.app.Activity.performDestroy(Activity.java:5614)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1124)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3760)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3791)
at android.app.ActivityThread.access$1400(ActivityThread.java:166)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1336)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5584)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
<com.pkmmte.view.CircularImageView
android:id="@+id/image_profile"
android:layout_centerVertical="true"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_marginLeft="8dp"
android:src="@drawable/unknown"
android:layout_marginRight="8dp"
android:layout_marginTop="32dp"
android:layout_marginBottom="32dp"
app:border="true"
app:border_color="@android:color/white"
app:border_width="2dp"/>
&#13;
img = (ImageView) view.findViewById(R.id.image_profile);
imageURL = session.getImage();
Glide.with(context)
.load(imageURL)
.fitCenter()
.error(R.drawable.unknown)
.into(img);
//