English 中文(简体)
无法从开发商Rolandid.com发射蓝色聊天样本
原标题:Unable to launch bluetooth chat sample app from developer.android.com on emulator

I have built a project from the existing samples of bluetooth chat for android 2.3 I am aware that the the emulator does not support bluetooth.

较早 我能够接手推器。 这些职能是徒劳的,但我是在东部能够看到这一职能。 我可以看到用户接口和所有内容。

But all of a sudden, today when I was trying the same app , I get an error saying bluetooth is not available and it quits.

我不知道是否有任何环境因错误而改变,但有些人能够帮助我做些什么。

最佳回答

you must have been using an earlier SDK version of the app that didn t check for absense of bluetooth support in the system....

I m 运行2.1 SDK版本的血清,并在那里检查。

你们有两个选择:

(1) 查阅并找到你以前用于先前的SDK的相同的示范守则,

(2) 进入法典(混合班级,Create()方法),并评论该法典:

    // Get local Bluetooth adapter
    mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();

    if (mBluetoothAdapter == null) {
        Toast.makeText(this, "Bluetooth is not available", Toast.LENGTH_LONG).show();
        finish();
        return;
    }

实际上,如果你只发表“定点()”一线,允许机器保持运行,同时仍然显示警告。

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签