3

BlackBerry Simulator をダウンロードしてインストールし、VMWare マシンで実行しました。そのコントローラーを実行しました。次に、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スタジオの緑色の実行矢印をクリックしてAndroidプロジェクトを実行すると、BlackBerryエミュレーターがAndroidデバイスリストに表示されません。BlackBerry シミュレーターで Android コードを実行するにはどうすればよいですか?

4

1 に答える 1