2017-01-18 5 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

てみてください。ファイル - >「無効化入賞\再起動」

アンドロイドスタジオだけの問題

+0

私はすでにそれをしましたが、成功しませんでした。質問に追加します、忘れました –

+0

プロジェクトディレクトリから.gradleを削除しようとしましたか?私のプロジェクトは2日間でした:getResources()メソッドを解決できません。 .gradleを削除した後、すべてが機能しました。 – kristyna

+0

私はまだしませんでした。私はそれを試してみます。ありがとう!! –

1

ことができます私はandroid.tools.build:gradle:2.3.0-beta3を使用し、同じ問題を抱えていました。私はAndroid Studio 2.2.3を2.3ベータ2にアップグレードし、すべてがうまくいきました。

3

としては、2.3.0以降のビルドAndroidのプラグインでは、デフォルトで有効になってこの答えhttps://stackoverflow.com/a/42765120/3825764

「キャッシュを構築する」で述べています。プロジェクトフォルダ外のビルドキャッシュにファイルを作成します(例:\ Users \%username%.android \ build-cache)。これらのファイルはプロジェクト間で共通のものです。

Android Studioでは、これらのファイルをナビゲートできません。

gradle.propertiesファイルでは、ビルドキャッシュを無効にすることができます。 android.enableBuildCache = falseを追加するだけです。

0

ファイル - >キャッシュを無効にする/再起動で問題が解決されませんでした。

環境設定 - >ビルド、実行、展開 - > GradleがGradle home:/ Applications/Android Studio.app/Contents/gradle/gradle-2.14.1で選択したローカルグラデルディストリビューションを使用し、間違っていた

デフォルトのグラデーションラッパーを使用する(推奨)を選択して問題を解決しました。 おそらく新しいローカル配布場所を指すだけでも機能します。

関連する問題