在模拟器的作品,不工作的设备。不幸的是iNemoADK已停止 [英] Works on Emulator, not working on device. Unfortunately iNemoADK has stopped
问题描述
我尝试在设备上运行示例程序(使用accesory开发套件和STM32有关),但无法成功修复。我进口偏食,检查,我能够虚拟设备上运行,它的工作好。但是,当我尝试在设备上运行它说:不幸的是,iNemoADK已经停止。我找遍了计算器,用户之一,有这个问题,并通过添加的setContentView(R.layout.layoutname)解决,但我不能这样解决我的问题。
这里是我的启动:
I try to run a sample program (related with accesory development kit and stm32) on device but can not be succeeded to fix. I imported to eclipse, checked and i am able to run on virtual device, it works good. But when i try to run on device it says "Unfortunately, iNemoADK has stopped". I searched all over stackoverflow, one of the user had that problem and solved by adding setContentView(R.layout.layoutname) but i can not solve my problem with this. Here is my launcher :
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
mUsbManager = UsbManager.getInstance(this);
setContentView(R.layout.main);
/* Handle the Accessory stuff */
mPermissionIntent = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);
IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION);
filter.addAction(UsbManager.ACTION_USB_ACCESSORY_DETACHED);
registerReceiver(mUsbBroadcastReceiver, filter);
final ActivityDataObject obj = (ActivityDataObject)getLastNonConfigurationInstance();
if (obj != null){
// TODO seguita la documentazione ma non funziona (???)
this.mAccessory = obj.getmAccessory();
this.mINemoInfo = obj.getmINemoInfo();
if(this.mAccessory != null){
openAccessory(this.mAccessory);
}
}
this.setStatus(mStatus);
}
这是我整个项目:
here is my whole project :
http://www.mediafire.com/?55uarh7v5f3vl55
先谢谢了。
推荐答案
您没有指定code实际上是有什么问题,只是症状(不幸的是......的消息是你的应用程序的标志扔,你不处理异常)。
You didn't specify what problem your code is actually having, just the symptoms ("Unfortunately..." message is a sign of your app throwing an exception that you're not handling).
使用类似 aLogRec 来看看什么是实际发生 - 问题可能是明显不够的,你要弄清楚
Use something like aLogRec to see what is actually happening - the problem may be obvious enough for you to figure out.
这篇关于在模拟器的作品,不工作的设备。不幸的是iNemoADK已停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!