を使ってちょっとしたHello World
プログラムを書きましたAndroid Studio
。最小 SDK API は 16 です。API 21 で実行されている仮想デバイスをインストールしましたが、プログラムは正常に動作します。また、正常に動作するAndroid 6携帯電話を搭載したGalaxy S5でプログラムを実行しようとしました.
次に、電話 (Galaxy S2 with Jelly Bean) を接続し、電話で実行しようとしました。ただし、アプリを閉じて表示されたプログラムを閉じただけです。
そして、これは Module:app build.gradle ファイルです:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "magu.schwaderina"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.android.support:support-vector-drawable:24.0.0'
testCompile 'junit:junit:4.12'
}
プロジェクト ディレクトリ全体はここにあります。
編集:Ubuntu 14.4でAndroid Studio 2.2 Prev 5を使用していることを忘れていました