【发布时间】:2015-10-29 02:11:04
【问题描述】:
我有一个使用相机意图的菜单项。但只要点击它,它就会崩溃。我用几种不同的相机意图方法对其进行了测试,它们都导致了崩溃。代码在下面的链接中(当我尝试直接插入 Java 代码时,StackOverflow 表现得很奇怪)
MainActivity/CameraIntent:https://gist.github.com/VirusThePanda/2c99048977c16f7e1ffa
LogCat:https://gist.github.com/VirusThePanda/66a13a58674fdacea224
菜单:
<item
android:id="@+id/photo"
android:icon="@drawable/ic_photo"
android:title="Take Photo"
android:onClick="phototake"
app:showAsAction="ifRoom" />
请注意 MainActivity 和 Menu 不是完整的文件。只是这个问题的重要部分。
【问题讨论】:
-
请重新格式化问题。
-
这是我能格式化的最好的格式。任何其他方式都不会显示代码:/
-
没有人会阅读这个问题。你会得到反对票:/
-
那我再发吧。
-
为您的问题添加更多详细信息,然后重新格式化您的代码。否则机器人不会让用户为你编辑你的帖子,最糟糕的是,你会被否决。
标签: java android android-intent