android - 当我在 android studio 中运行 android 项目时,BlackBerry Simulator 不显示?

标签 android blackberry-10 blackberry-simulator blackberry-android

我已经下载并安装了 BlackBerry Simulator 并在 VMWare Machine 中运行它。我已经运行了它的 Controller 。然后,我在 android studio 中创建了一个简单的 hello world 项目。这是 MainActivity.java:

public class MainActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}
}

这是 XML:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.vats.vatishs.helloworld.MainActivity">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello World!" />
</RelativeLayout>

这是应用程序的build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 18
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.vats.vatishs.helloworld"
    minSdkVersion 11
    targetSdkVersion 18
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:18.+'
}

然后我运行 BlackBerry ADB Proxy Manager,然后我点击运行 BlackBerry 模拟器的播放图标。现在,如果我通过单击 android studio 的绿色运行箭头来运行我的 android 项目,BlackBerry 模拟器不会显示在 Android 设备列表中。我应该怎么做才能在 BlackBerry 模拟器上运行我的 Android 代码???

最佳答案

我执行了以下操作以使其出现在 Android studio 中:

  1. 您需要转到 Android Platform-tools 文件夹。
  2. 运行命令

    ./adb connect 你运行设备的IP

  3. 然后,该设备应该出现在您的 Android Studio 设备列表中。

** 与您提供给 BlackBerry ADB Proxy Manager 的相同

关于android - 当我在 android studio 中运行 android 项目时,BlackBerry Simulator 不显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35619542/

相关文章:

java - 在 libgdx 中显示大文本

android - 如何在工具栏的右侧放置 ProgressBar?

android - 如何正确实现onDestroy方法?

java - 黑莓设备无法连接到互联网?

blackberry - 如何在黑莓中以编程方式发送短信

windows-7 - 黑莓模拟器屏幕刷新

android - Google Plus +1 Google Play 应用程序?

triggers - headless (headless)应用程序 BlackBerry 10

blackberry - 如何将黑莓Z10模拟器更改为黑莓q10模拟器

android - 如何在不 fork 的情况下创建黑莓版本的 Android 项目?