【发布时间】:2016-07-16 22:37:00
【问题描述】:
我使用Android Studio 编写了一个小Hello World 程序。最小的 sdk API 是 16。我安装了在 API 21 上运行的虚拟设备,程序运行良好。我还尝试在装有 Android 6 手机的 Galaxy S5 上运行该程序,效果很好。
然后我连接了我的手机(带有 Jelly Bean 的 Galaxy S2)并尝试在手机上运行它。但是它只关闭了应用程序并关闭了显示的程序。
Here is the log shown by Android Studio
这是 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'
}
整个项目目录可以在here找到。如果我出错了,任何帮助将不胜感激。
编辑:我忘了提到我在 Ubuntu 14.4 上使用的是 Android Studio 2.2 Prev 5
【问题讨论】:
-
Android studio 已经为每个 api 版本设置好了,没有什么比 为 Jelly Bean 设置 Android Studio..!!
-
你能从你的android工作室发布错误日志吗
-
@APPBird。错误日志以及整个项目都已链接,我无法将它们直接粘贴到问题中,因为它们太长了。
标签: android android-studio android-4.1-jelly-bean