添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When trying to run slice of my app in Slice Viewer I have the following NPE exception. I followed this guide https://developer.android.com/guide/slices/getting-started and this one https://www.androidauthority.com/android-slices-872250/ . If I move all the code (provider, broadcast receiver) to Slice Viewer project slice is working fine. I do not see permissions request to access slice of my app. Any ideas? I use Slice Viewer 1.0.1

2019-05-28 23:11:46.186 19585-19585/com.example.android.sliceviewer W/InputMethodManager: startInputReason = 5
2019-05-28 23:11:46.784 19585-19618/com.example.android.sliceviewer E/AndroidRuntime: FATAL EXCEPTION: AsyncTask googlearchive/android-SliceViewer#1
Process: com.example.android.sliceviewer, PID: 19585
java.lang.NullPointerException: uriString
at android.net.Uri$StringUri.(Uri.java:481)
at android.net.Uri$StringUri.(Unknown Source:0)
at android.net.Uri.parse(Uri.java:443)
at androidx.slice.Slice.getUri(Slice.java:203)
at androidx.slice.widget.SliceLiveData$SliceLiveDataImpl$1.run(SliceLiveData.java:293)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:257)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:784)