Could not get unknown property 'ANDROID_BUILD_SDK_VERSION'
生活随笔
收集整理的這篇文章主要介紹了
Could not get unknown property 'ANDROID_BUILD_SDK_VERSION'
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Error:(7, 0) Could not get unknown property ‘ANDROID_BUILD_SDK_VERSION’ for project ‘:InitActivity’
build.gradle如下
apply plugin: 'com.android.library'dependencies { }android {compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSIONdefaultConfig {minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)}sourceSets {main {manifest.srcFile 'AndroidManifest.xml'java.srcDirs = ['src']jniLibs.srcDirs = ['libs']aidl.srcDirs = ['src']renderscript.srcDirs = ['src']res.srcDirs = ['res']}} }解決方法
方法1:在工程的根目錄下,創(chuàng)建gradle.properties文件
ANDROID_BUILD_TARGET_SDK_VERSION=25 ANDROID_BUILD_TOOLS_VERSION=25.0.0 ANDROID_BUILD_SDK_VERSION=25 ANDROID_BUILD_MIN_SDK_VERSION=14方法2:Android Studio
方法3
android {compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSIONdefaultConfig {minSdkVersion 8targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)} android {compileSdkVersion 19buildToolsVersion '19.1.0'defaultConfig {minSdkVersion 15targetSdkVersion 19}總結(jié)
以上是生活随笔為你收集整理的Could not get unknown property 'ANDROID_BUILD_SDK_VERSION'的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 新闻阅读器频道管理
- 下一篇: 开源全能播放器Vitamio的使用