2017-01-18 8 views
0

com.android.tools.build:gradle을 프로젝트에서 2.3.0-beta1로 업데이트 한 후이 문제가 발생했습니다. 2.2.3으로 다시 설정하면 Theme.AppCompat 스타일이 인식됩니다.com.android.tools.build:gradle을 2.3.0-beta1로 업데이트 한 후 Theme.AppCompat 심볼을 해결할 수 없습니다

프로젝트가 시간 초과되지 않아서 2.2.3으로 설정하고 싶지 않습니다.

enter image description here

내 프로젝트의 build.gradle : 여기

오류의 인쇄입니다

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.0-beta1' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

내 애플의 build.gradle :

해당 오류의 위해
apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 

android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.2' 
    defaultConfig { 
     applicationId "com.xxxxxxx.xxxxxxx" 
     minSdkVersion 19 
     targetSdkVersion 25 
     versionCode 76 
     versionName "1.18.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    compileOptions { 
     sourceCompatibility JavaVersion.VERSION_1_7 
     targetCompatibility JavaVersion.VERSION_1_7 
    } 
    useLibrary 'org.apache.http.legacy' 
} 

buildscript { 

    dependencies { 
     classpath 'io.fabric.tools:gradle:1.+' 
    } 

    repositories { 

     maven { 
      url 'https://maven.fabric.io/public' 
     } 

    } 

} 

repositories { 

    maven { 
     url "https://raw.github.com/embarkmobile/zxing-android-minimal/mvn-repo/maven-repository/" 
    } 

    maven { 
     url 'https://maven.fabric.io/public' 
    } 

    flatDir { 
     dirs 'libs' 
    } 

} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    compile('de.keyboardsurfer.android.widget:crouton:[email protected]') { 
     exclude group: 'com.google.android', module: 'support-v4' 
    } 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true; 
    } 
    compile(name: 'libctfclient-sdk', ext: 'aar') 

    compile 'com.android.support:appcompat-v7:25.1.0' 
    compile 'com.android.support:support-v13:25.1.0' 
    compile 'com.android.support:support-v4:25.1.0' 
    compile 'com.android.support:design:25.1.0' 

    compile 'com.github.gabrielemariotti.cards:library:1.8.0' 
    compile 'com.github.gabrielemariotti.cards:library-extra:1.8.0' 
    compile 'com.github.castorflex.smoothprogressbar:library:1.1.0' 
    compile 'com.github.chrisbanes.actionbarpulltorefresh:library:0.9.9' 
    compile 'com.embarkmobile:zxing-android-minimal:[email protected]' 
    compile 'com.embarkmobile:zxing-android-integration:[email protected]' 
    compile 'com.google.zxing:core:3.0.1' 
    compile 'com.mcxiaoke.volley:library:1.0.19' 
    compile 'com.google.android.gms:play-services-analytics:9.8.0' 
    compile 'com.github.nkzawa:socket.io-client:0.3.0' 
    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' 
} 

, 내가 가진이 문제 :

enter image description here

난 이미 시도 :

  • Invalidate Caches\Restart;

  • 최신 버전으로 안드로이드 지원 라이브러리 업데이트;

  • 프로젝트를 지우고 다시 빌드하십시오.

아무도 프로젝트의 build.gradle을 2.2.3으로 설정하지 않고이 문제를 해결하는 방법을 알고 있습니까?

답변

-1

시도 : 파일 -> "무효화 현금화 \ 다시 시작"

안드로이드 스튜디오의 단지 문제가 될 수 있습니까 android.tools.build:gradle:2.3.0-beta3 사용과 같은 문제가 있었다

+0

나는 그것을 이미했지만 성공하지 못했습니다. 질문에 추가 하겠지만, 잊어 버렸습니다 –

+0

프로젝트 디렉토리에서 .gradle을 삭제하려고 시도 했습니까? 2 일 내 프로젝트처럼 : getResources() 메서드를 해결할 수 없습니다. .gradle을 제거한 후에 모든 것이 작동했습니다. – kristyna

+0

나는 아직하지 않았다. 시도해 볼게. 감사!! –

1

. Android Studio 2.2.3을 2.3 베타 2로 업그레이드했으며 모든 것이 효과가있었습니다.

3

으로는 2.3.0 이후 빌드 안드로이드 플러그인에서 기본적으로 활성화되어이 답변 https://stackoverflow.com/a/42765120/3825764,

"캐시를 구축"고 말했다. 프로젝트 폴더 외부의 빌드 캐시 (예 : \ Users \ % username % .android \ build-cache)에 파일을 생성합니다. 이 파일은 프로젝트간에 공통적으로 사용됩니다.

그리고 나서 Android Studio는 theese 파일을 탐색 할 수 없습니다.

gradle.properties 파일에서 빌드 캐시를 비활성화 할 수 있습니다. android.enableBuildCache = false를 추가하십시오.

0

파일 -> 캐시 재시작/재시작으로 문제가 해결되지 않았습니다.

환경 설정 -> 빌드, 실행, 배포 -> Gradle에서 Gradle home :/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1로 선택한 로컬 gradle 배포 사용 및 gradle 위치를 나타내는 경고가 표시되었습니다. 잘못된 것입니다.

기본 그라디언트 래퍼 사용 (권장)을 선택하여 문제를 해결했습니다. 아마도 새로운 로컬 배포 위치를 가리키고있을 수도 있습니다.