首页 \ 问答 \ 每次在Android 4上,ShareCompat IntentBuilder都会崩溃(ShareCompat IntentBuilder crashing every time on Android 4)

每次在Android 4上,ShareCompat IntentBuilder都会崩溃(ShareCompat IntentBuilder crashing every time on Android 4)

在我的一个活动中,我使用ShareCompat IntentBuilder来允许用户共享一些文本:

                ShareCompat.IntentBuilder
                    .from(this)
                    .setText("The shared text")
                    .setType("text/plain")
                    .setChooserTitle("Share to")
                    .startChooser();

在Android 5及更高版本上,这可以正常工作,但在Android 4上,我每次都有以下崩溃:

android.app.SuperNotCalledException: Activity {android/com.android.internal.app.ChooserActivity} did not call through to super.onStop()
at android.app.Activity.performStop(Activity.java:4606)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3071)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3130)
at android.app.ActivityThread.access$1200(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1180)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

不知道为什么会这样,任何帮助将不胜感激,谢谢!


In one of my activities, I am using the ShareCompat IntentBuilder to allow users to share some text:

                ShareCompat.IntentBuilder
                    .from(this)
                    .setText("The shared text")
                    .setType("text/plain")
                    .setChooserTitle("Share to")
                    .startChooser();

On Android 5 and above, this works as expected, but on Android 4, I have the following crash every time:

android.app.SuperNotCalledException: Activity {android/com.android.internal.app.ChooserActivity} did not call through to super.onStop()
at android.app.Activity.performStop(Activity.java:4606)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3071)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3130)
at android.app.ActivityThread.access$1200(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1180)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

Not sure why this is happening, any help would be appreciated, thanks!


原文:https://stackoverflow.com/questions/39088261
更新时间:2022-02-07 20:02

最满意答案

开始考虑如何以MR方式解决挑战。 这里( 1,2 )是一些资源。 这些有一些可以用任何语言实现的MR算法。


Start thinking on how to solve challenges in a MR way. Here (1, 2) are some resources. These have got some of the MR algorithms which can be implemented in any language.

相关问答

更多
  • 在Hadoop中,您处理输入拆分而不是块。 输入拆分是完整的数据集。 您希望避免一个映射器超过两个拆分的情况,因为这会降低性能并创建流量。 在文本世界中,假设您在block1中并且您有一个句子,例如“我是一个哈”,而block2继续“doop developer”,那么这会创建网络流量,因为我们始终必须在一个完整的节点上工作输入拆分和一些数据必须转移到另一个节点。 In Hadoop you work on input splits and not on blocks. An input split is ...
  • 在深入研究错误日志后,似乎我已经在用户级安装了R库,我应该在系统级安装它。 详细说明如何在系统级别上安装R库可以在这个帖子上找到。(“dev_tools”软件包可以派上用场,记得在sudo下运行R,或者你可以更喜欢sudo R CMD INSTALL [package_name] ) 您可以通过system.file(package="[package_name]")仔细检查R中的软件包安装路径,但这始终显示软件包的第一个首选库路径。 所以我强烈建议以前安装用户库。 再运行几次以仔细检查错误日志并确保在R系 ...
  • 答案是内存不够。 每个容器的任务(map或reduce)对我的机器都太大了。 这个错误: 2015-02-03 15:02:13,808 INFO [AsyncDispatcher event handler] org.apache.hadoop.mapreduce.v2.app.job.impl.TaskAttemptImpl: Diagnostics report from attempt_1422959549820_0005_m_000000_0: Container killed by the Ap ...
  • 既然您了解Mapper和Reducer的格式为Key1,Value1,Key2,Value2,Key1和Value1是输入键值类型,Key2和Value2是输出类型,我将解释其余的。 在主要功能中,你会看到一行说, job.setInputFormatClass(TextInputFormat.class); 现在,这就决定了如何读取输入文件。 如果你看一下TextInputFormat的来源 ,你会看到它(在它的第41行)它使用LineRecordReader ( source )将文件分成键值对。 这 ...
  • 开始考虑如何以MR方式解决挑战。 这里( 1,2 )是一些资源。 这些有一些可以用任何语言实现的MR算法。 Start thinking on how to solve challenges in a MR way. Here (1, 2) are some resources. These have got some of the MR algorithms which can be implemented in any language.
  • 这可能发生在作业仅检测到本地文件系统的情况下,它使用LocalFileSystem API与本地文件系统中的文件进行交互。 请参考以下链接, 使用MiniDFSCluster单元测试hadoop hdfs着作 这是我们在开发环境中开发的mapreduce / hdfs代码的单元测试选项之一。虽然在hadoop clsuter中部署相同的代码,但输入文件将在HDFS位置。 This probably happens in the scenario where the job only detects the ...
  • 请参阅org.apache.hadoop.examples.Sort 使用map / reduce并不是非常简单。 它涉及获取数据的直方图并使用TotalOrderPartitioner 。 或者,您可以使用Hive或Pig,它具有内置的排序功能。 See org.apache.hadoop.examples.Sort This is not super-straightforward to do using map/reduce. It involves taking a histogram of you ...
  • 这只是文件hdfs-site.xml中的权限问题 It was just permission problem in the file hdfs-site.xml
  • 显然答案是否定的:无法从srcsrv.dll获取更多信息。 Microsoft论坛版主告诉我 ,消息“Donnéesnonvalides”,“Invalid data”可能与要下载的文件的路径长度有关。 此路径将合并到您在Visual Studio / WinDBG设置中指定的临时符号路径。 例如,如果你已经指定了 %APPDATA%\Symbols 作为本地符号存储,您将在地址下载由HTTP服务器托管的源文件 http://nightlybuilds.int/sources/get.svc/path/ ...
  • 尝试: Hadoop job -list 杀死所有工作并重新运行: Hadoop job –kill 尝试检查作业跟踪器的日志是否有错误 http://localhost:50070/ – web UI of the NameNode daemon http://localhost:50030/ – web UI of the JobTracker daemon http://localhost:50060/ – web UI of the TaskTracker daemon The ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)