我正在尝试使用Android"Google Maps Android API v2" 的示例代码.我没有错误地构建项目.但是,当我尝试在我的Galaxy Nexus上运行应用程序(与usb连接到我的笔记本电脑)时,应用程序立即崩溃.
这是日志记录:
Unable to resolve superclass of Lcom/example/mapdemo/BasicMapActivity; (66)
Link of class 'Lcom/example/mapdemo/BasicMapActivity;' failed
Could not find class 'com.example.mapdemo.BasicMapActivity', referenced from method com.example.mapdemo.MainActivity.<clinit>
VFY: unable to resolve const-class 108 (Lcom/example/mapdemo/BasicMapActivity;) in Lcom/example/mapdemo/MainActivity;
VFY: replacing opcode 0x1c at 0x000d
Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/example/mapdemo/MainActivity;
Class init failed in newInstance call (Lcom/example/mapdemo/MainActivity;)
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x41ac9930)
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at java.lang.Class.newInstanceImpl(Native Method) …Run Code Online (Sandbox Code Playgroud) 有时我的iPhone应用程序崩溃了一个奇怪的崩溃日志,读取异常代码是0x8badf00d.堆栈跟踪显示应用程序执行的随机快照,但没有任何可疑之处.这很少发生,我无法找到如何重现它.有没有人更了解这种异常和异常代码?
以下是我的崩溃日志的摘录:
异常类型:00000020
异常代码:0x8badf00d
突出显示的线程:0特定
于应用程序的信息:无法停用线程0:
......
<这里没什么可疑的>
...未知的线程因未知风味而崩溃:5,state_count:1
编辑:我检查过该问题仅在手机设置为"法语"时出现.
我目前正在构建自己的应用程序,在手机上使用DatePicker小部件时遇到问题(调试模式手机:三星S5).
错误收集是:java.util.IllegalFormatConversionException
我添加了有关logcat中收集的问题的更多详细信息:
02-20 10:37:18.255 13029-13029/avappmobile.mytasks E/AndroidRuntime? FATAL EXCEPTION: main
Process: avappmobile.mytasks, PID: 13029
java.util.IllegalFormatConversionException: %d can't format java.lang.String arguments
at java.util.Formatter.badArgumentType(Formatter.java:1489)
at java.util.Formatter.transformFromInteger(Formatter.java:1689)
at java.util.Formatter.transform(Formatter.java:1461)
at java.util.Formatter.doFormat(Formatter.java:1081)
at java.util.Formatter.format(Formatter.java:1042)
at java.util.Formatter.format(Formatter.java:1011)
at java.lang.String.format(String.java:1803)
at android.content.res.Resources.getString(Resources.java:1453)
at android.content.Context.getString(Context.java:397)
at android.widget.SimpleMonthView$MonthViewTouchHelper.getItemDescription(SimpleMonthView.java:684)
at android.widget.SimpleMonthView$MonthViewTouchHelper.onPopulateNodeForVirtualView(SimpleMonthView.java:628)
at com.android.internal.widget.ExploreByTouchHelper.createNodeForChild(ExploreByTouchHelper.java:377)
at com.android.internal.widget.ExploreByTouchHelper.createNode(ExploreByTouchHelper.java:316)
at com.android.internal.widget.ExploreByTouchHelper.access$100(ExploreByTouchHelper.java:50)
at com.android.internal.widget.ExploreByTouchHelper$ExploreByTouchNodeProvider.createAccessibilityNodeInfo(ExploreByTouchHelper.java:711)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1179)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1091)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1087)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1087)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1087)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1087)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1087)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1087)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1087)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1087)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1087)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:888)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:155)
at android.view.AccessibilityInteractionController.access$400(AccessibilityInteractionController.java:53)
at …Run Code Online (Sandbox Code Playgroud) 我出于示例目的显示了此问题的代码,但实际上我的问题是:我应该如何跟踪并理解SIGABRT错误?我读到了这个问题:没有错误信息的sigabrt,但我不认为这与我的问题有关.
我将在下面展示的示例显然不是xib问题,之前获得SIGABRT似乎更多地与未处理的异常有关.我尝试过使用GDB,bt但这没有用.是否没有更全面的转储可供查看?我也使用过NSZombie,但我真的不明白如何使用它,所以如果这是你的答案,请提供一个文档的链接,说明我应该如何从中获取相关数据.
这是我的例子:我正在尝试使用Core Data.我的项目最初并没有设置它,所以我不得不手动添加它,我通过转到我的项目> Build Phases> Link Binary with Libraries>点击加号并添加CoreData.framework
然后我通过转到文件>新建>数据模型创建了我的数据模型.我创建了很多属性,就是这样
之后,我向app委托添加了正确的方法(我通过使用Core Data创建一个新项目,然后复制方法来完成此操作):
//code removed, as its not needed for the question/answer
Run Code Online (Sandbox Code Playgroud)
在此之后,我只是尝试将值保存到托管对象(再一次,使用新项目从默认实现复制代码):
//code removed, as its not needed for the question/answer
Run Code Online (Sandbox Code Playgroud)
但是,当我执行该addTime方法时,我得到的只是SIGABRT错误.

我的android应用程序在强制关闭后重新启动,通过我的整个应用程序,包括20个活动,我依赖于在主要活动上创建的静态数据.因此,一旦应用程序崩溃,我的所有静态数据都会丢失,当应用程序自动重启时,它几乎没有任何基本数据可供操作.
我的问题是,在崩溃时我希望这件事发生
我知道当活动崩溃时,android系统会将堆栈中的下一个活动带到前台,这就是我的应用程序产生冗余结果的原因.我也经历了Android开发人员,但我唯一知道的是在Manifest中设置一个属性android:finishOnTaskLaunch="true".但不幸的是,这对我毫无帮助.我非常感谢你帮助解决这个问题,并让我知道原因和分析.
我是制作iPhone应用程序的新手,这是我的第一次尝试.
我做了一个简单的应用程序,里面有两个按钮.一个按钮打开一个URL,另一个按钮打开一个弹出窗口.
我还没有注册成为苹果开发人员,而是通过将其连接到Xcode来测试我在物理设备上的应用程序.
当我安装应用程序时,尽管它与Xcode断开连接,它仍可正常运行几天.但是,几天后,应用程序无法打开并闪烁黑色空白屏幕并返回主屏幕.
当我将它重新连接到Xcode并在同一个iPhone上再次运行相同的代码时,它会再次正常工作几天然后再次崩溃.
我无法理解为什么应用程序在几天之后就会以这种方式运行而不是立即行动.
当一个人没有以开发者身份登录时,是否有申请到期期限?(配置文件显示即将到期)如果没有,请指导我如何解决此问题?
请尽量给我你尊敬的建议/意见,因为我很困难,需要尽快找到解决方案.
非常感谢!
我想尽快展示的小吃店为用户打开谷歌地图的活动,但问题是,有在活动中没有意见,该活动的第一个参数使用(在findViewById()中Snackbar.make()).我放在那里?这是java类代码:
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
mMap.setBuildingsEnabled(true);
mMap.getUiSettings().setZoomControlsEnabled(true);
float cameraZoom = 17;
LatLng location = new LatLng(43.404032, -80.478184);
mMap.addMarker(new MarkerOptions().position(location).title("49 McIntyre Place #18, Kitchener, ON N2R 1G3"));
CameraUpdateFactory.newLatLngZoom(location, cameraZoom);
Snackbar.make(findViewById(/*WHAT …Run Code Online (Sandbox Code Playgroud) 澄清问题:
当OS发送命令将扇区写入磁盘时它是原子的吗?即,如果电源在写入命令之后立即失败,则新数据的写入将完全成功或旧数据保持不变.我不关心多扇区写入会发生什么 - 撕裂的页面是可以接受的.
老问题:
假设您在磁盘上有旧数据X,您在其上写入新数据Y,并且在写入期间树落在电源线上.如果没有花哨的UPS或备用电池的磁盘控制器,最终可能会出现页面撕裂的情况,磁盘上的数据是X部分和Y部分.您是否最终会遇到磁盘上的数据是X部分,Y部分的情况和部分垃圾?
我一直在努力理解像数据库这样的ACID系统的设计,而且我的天真想法似乎是firebird,它不使用预写日志,依赖于给定的写入不会破坏旧数据(X) - 只能完全写入新数据(Y).这意味着如果要覆盖X的一部分,则只能更改被覆盖的X部分,而不是我们打算保留的部分X.
为了澄清,这意味着如果你有一个页面大小的缓冲区,说4096个字节,充满了一半Y,一半X,我们要保持 - 我们告诉OS编写过X该缓冲区,有严重的磁盘的任何事都不短在写入期间我们想要保留的半X被破坏的失败.
我的iOS应用程序存在很大问题:它有时会在没有详细调试错误的情况下崩溃.堆栈跟踪为空.这些是堆栈跟踪中仅有的两行:
在com.apple.main-thread.
Xcode调试器上的错误(连接设备):
malloc: *** error for object 0x208a7614: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Run Code Online (Sandbox Code Playgroud)
我在malloc_error_break中使用libsystem_c.dylib设置了断点,没有来自调试器的任何反馈.我不知道要解决这个问题.
我的应用程序崩溃了.它发生在很多用户及其在ActivityThread.java方法reportSizeConfigurations中的多个位置.我不知道这是用来做什么的,为什么它会冻结.
冻结发生在启动屏幕(主活动启动后)之后,仅在升级应用程序时发生.如果重新安装该应用程序,问题就会消失.问题是,我不能告诉所有用户重新安装应用程序...
有谁知道可能导致这种情况的原因和原因?似乎可能与某些数据库处理有关,但这只是猜测.
来自Crashlytics的堆栈跟踪:
Fatal Exception: java.lang.IllegalArgumentException: reportSizeConfigurations: ActivityRecord not found for: Token{a28a055 null}
at android.os.Parcel.readException(Parcel.java:1697)
at android.os.Parcel.readException(Parcel.java:1646)
at android.app.ActivityManagerProxy.reportSizeConfigurations(ActivityManagerNative.java:8342)
at android.app.ActivityThread.reportSizeConfigurations(ActivityThread.java:3049)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2992)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Run Code Online (Sandbox Code Playgroud)
来自Play商店'ANRs&crashes'的堆栈跟踪:
"main" prio=5 tid=1 TimedWaiting
| group="main" sCount=1 dsCount=0 obj=0x74864f70 self=0x7f8b896a00
| sysTid=28578 nice=0 cgrp=default sched=0/0 handle=0x7f8f832a98
| state=S schedstat=( 237746089 66838748 1069 ) utm=18 stm=5 core=6 HZ=100
| stack=0x7fcdbf9000-0x7fcdbfb000 stackSize=8MB
| held mutexes=
at java.lang.Object.wait! (Native method)
- waiting …Run Code Online (Sandbox Code Playgroud) crash ×10
android ×5
objective-c ×3
ios ×2
iphone ×2
acid ×1
c ×1
cocoa-touch ×1
crashlytics ×1
datepicker ×1
device ×1
forceclose ×1
java ×1
malloc ×1
maps ×1
sample ×1
sigabrt ×1
stack ×1
xcode ×1
xml ×1