zoukankan      html  css  js  c++  java
  • android studio 新建项目之后异常解决

      今天在公司使用android studio 新建了一个项目,竟然,直接就报错了,错误信息如下:

        

    /Users/james/Development/AndroidProjects/myapp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.0/res/values-v23/values-v23.xml
    Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
    Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

      解决办法:

        将build.gradle文件修改为:

          

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 21
        buildToolsVersion "21.1.2"
    
        defaultConfig {
            applicationId "com.example.xxx_009.mydemo2"
            minSdkVersion 17
            targetSdkVersion 21
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:21.0.3'
    }

      不同环境可能修改的内容不一样,推荐大家可以打开能在android studio正常运行的项目,然后参考正常运行项目的build.gradle文件.

  • 相关阅读:
    SPOJ ORDERSET
    BZOJ 1109: [POI2007]堆积木Klo
    BZOJ 1112: [POI2008]砖块Klo
    BZOJ 4144: [AMPPZ2014]Petrol
    BZOJ 4385: [POI2015]Wilcze doły
    BZOJ 1124: [POI2008]枪战Maf
    BZOJ 1123: [POI2008]BLO
    BZOJ 1121: [POI2008]激光发射器SZK
    BZOJ 1131: [POI2008]Sta
    BZOJ 4551: [Tjoi2016&Heoi2016]树
  • 原文地址:https://www.cnblogs.com/lomomiao/p/4831545.html
Copyright © 2011-2022 走看看