zoukankan      html  css  js  c++  java
  • android studio应用获取系统属性权限(SystemProperties)

    dependencies {
        provided files(getLayoutLibPath())
    }
     
    /** ZhangChao time:2014-12-31,get layoutlib.jar path. android.os.SystemProperties need it. */
    // must called after "android" definition
    def getLayoutLibPath() {
        def rootDir = project.rootDir
        def localProperties = new File(rootDir, "local.properties")
        if (localProperties.exists()) {
            Properties properties = new Properties()
            localProperties.withInputStream {
                instr -> properties.load(instr)
            }
            def sdkDir = properties.getProperty('sdk.dir')
            def compileSdkVersion = android.compileSdkVersion
            Console.println("app compileSdkVersion : " + compileSdkVersion)
            def androidJarPath = sdkDir + "/platforms/" + compileSdkVersion + "/data/layoutlib.jar"
            return androidJarPath
        }
        return rootDir
    }
  • 相关阅读:
    Spring Boot自动配置
    Servlet、JSP总结(1)
    Spring MVC
    Springboot中的数据库事务
    数据库访问
    AOP
    全注解下的IOC
    spring boot入门
    安卓工程化开发笔记(2)
    2048功能说明模板
  • 原文地址:https://www.cnblogs.com/maogefff/p/8259408.html
Copyright © 2011-2022 走看看