小编tas*_*had的帖子

什么是compileSdkVersion?

昨天刚从Eclipse搬到Android工作室,我正在设法弄清一切。在我的构建等级中,我现在看到一个“ compileSdkVersion”,而且我似乎无法弄清楚它是什么。我知道minSdk会告诉GooglePlay该应用程序可以处理多长时间的设备。并且那个targetSdk告诉设备是否天气,它应该切换到前向兼容性。但是我不知道什么是compileSdk以及应该如何处理。另外,作为一个附带问题,如果我将targetSdk设置为21,则在sdk 16上运行的设备是否以兼容模式运行?谢谢你的帮助!对此,我真的非常感激!

编辑:我请不要将我链接到android开发者网站。我已经读过,但我不明白为什么如果已有最小,最大和目标sdk版本,则在不同的sdk中进行编译会有所不同。再次感谢您的帮助!

这是gradle代码。

apply plugin: 'com.android.application'

android {
compileSdkVersion 17 
buildToolsVersion "19.1.0"

defaultConfig {
    applicationId "com.devname.myapp"
    minSdkVersion 10
    targetSdkVersion 21
}

buildTypes {
    release {
        runProguard true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
    }
}
}

dependencies {
compile 'com.android.support:support-v4:21.0.0'     
compile files('libs/libGoogleAnalyticsServices.jar')
}
Run Code Online (Sandbox Code Playgroud)

java eclipse android

2
推荐指数
1
解决办法
3576
查看次数

多个Python if-statments?

我通常不用Python开发,但我有一些IDE和代码编辑器,我经常使用和切换.为了让自己更方便,我想我会制作一个快速的Python程序,根据输入启动我的IDE/Editor.问题是,每次运行程序时,第一个if-statment总是验证为true并运行该操作.

这是我的代码:

import os

#NOTE: I have trimmed the root directories here to save space. Just removed the subfolder names, but the programs are the same. 

notepadPlusPlusLaunch = "C:\\Notepad++\\notepad++.exe"
bracketsLaunch = "C:Brackets\\Brackets.exe"
aptanaLaunch = "C:Aptana Studio\\AptanaStudio3.exe"
devCppLaunch = "C:Dev-Cpp\\devcpp.exe"
githubLaunch = "C:GitHub,  Inc\\GitHub.appref-ms"
androidLaunch = "C:android-studio\\bin\\studio64.exe"
ijLaunch = "C:bin\\idea.exe"
pycharmLaunch = "C:JetBrains\\PyCharm  4.0.5\\bin\\pycharm.exe"
sublimeLaunch = "C:Sublime Text 3\\sublime_text.exe"

def launcherFunction(command):
    os.startfile(command)

launchCommand = input("")

if launchCommand == "notepad" or "npp" or "n++" or "n":
    launcherFunction(notepadPlusPlusLaunch)

elif launchCommand == "brackets" or …
Run Code Online (Sandbox Code Playgroud)

python python-3.x

0
推荐指数
1
解决办法
156
查看次数

标签 统计

android ×1

eclipse ×1

java ×1

python ×1

python-3.x ×1