2017-06-06 22 views
0

内部、私はこのメッセージに遭遇しました:清掃、プロジェクトの更新に失敗しました - エラー:原因:ORG/Gradleの/はgithubのからこのプロジェクトをインポート/ TrueTimeProvider

Gradle 'GameOfLife-master' project refresh failed 
Error:Cause: org/gradle/internal/TrueTimeProvider 

私が試したソリューションがhereを掲載/再構築(少なくとも試行された)プロジェクトを無効にし、キャッシュを無効にし、Gradleの別のバージョンを試しました。それのどれも働かなかった。他に誰かが何か考えを持っていますか?

モジュール:アプリ - あなたは

のGradleはpublic APIとprivate APIの概念があり、完全な例外スタックトレースを取得するために--stacktraceで実行することができbuild.gradle

buildscript { 
    repositories { 
     mavenCentral() 
     maven { url 'https://maven.fabric.io/public' } 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.2' 
     classpath "com.neenbedankt.gradle.plugins:android-apt:1.8" 
     classpath 'com.jakewharton.hugo:hugo-plugin:1.1.0' 
     classpath "net.rdrei.android.buildtimetracker:gradle-plugin:0.5.+" 
     classpath 'io.fabric.tools:gradle:1.+' 
     classpath 'hu.supercluster:paperwork-plugin:1.2.7' 
    } 
} 

apply plugin: 'com.android.application' 
apply plugin: 'android-apt' 
apply plugin: 'io.fabric' 
apply plugin: 'hugo' 
apply plugin: "build-time-tracker" 
apply plugin: 'hu.supercluster.paperwork' 

paperwork { 
    set = [ 
      gitInfo: gitInfo(), 
      gitSha: gitSha(), 
      buildTime: buildTime("yyyy-MM-dd HH:mm:ss", "GMT+01:00") 
    ] 
} 

def versionMajor = 1 
def versionMinor = 2 
def versionPatch = 0 

android { 
    compileSdkVersion androidCompileSdkVersion 
    buildToolsVersion androidBuildToolsVersion 

    defaultConfig { 
     applicationId 'hu.supercluster.gameoflife' 
     minSdkVersion androidMinSdkVersion 
     targetSdkVersion androidTargetSdkVersion 

     versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch 
     versionName "${versionMajor}.${versionMinor}.${versionPatch}" 

     testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner" 
    } 

    signingConfigs { 
     alpha {} 
     beta {} 
     release {} 
    } 

    buildTypes { 
     debug { 
      applicationIdSuffix ".debug" 
      versionNameSuffix "-debug" 
      resValue "string", "app_name_for_buildtype", "Game of Life (debug)" 
      minifyEnabled false 
      testCoverageEnabled = false 
     } 

     alpha { 
      applicationIdSuffix ".alpha" 
      versionNameSuffix "-alpha" 
      resValue "string", "app_name_for_buildtype", "Game of Life (alpha)" 
      minifyEnabled false 
      testCoverageEnabled = false 
      lintOptions { 
       disable 'MissingTranslation' 
      } 
     } 

     beta { 
      applicationIdSuffix ".beta" 
      versionNameSuffix "-beta" 
      resValue "string", "app_name_for_buildtype", "Game of Life (beta)" 
      minifyEnabled false 
      testCoverageEnabled = false 
     } 

     release { 
      resValue "string", "app_name_for_buildtype", "Game of Life" 
      minifyEnabled false 
      proguardFile 'proguard-project.txt' 
     } 
    } 

    sourceSets.main { 
     // src/gen is the target for generated content like json model 
     java.srcDirs += 'build/generated/source/db' 
    } 

    // avoid errors with message 'Duplicate files copied in APK ...' 
    packagingOptions { 
     exclude 'LICENSE.txt' 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/license.txt' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/notice.txt' 
     exclude 'META-INF/ASL2.0' 
    } 
} 

afterEvaluate { 
    def propsFile = rootProject.file('keystore.properties') 
    def configName = 'release' 

    if (propsFile.exists() && android.signingConfigs.hasProperty(configName)) { 
     def props = new Properties() 
     props.load(new FileInputStream(propsFile)) 
     android.signingConfigs[configName].storeFile = rootProject.file(props['storeFile']) 
     android.signingConfigs[configName].storePassword = props['storePassword'] 
     android.signingConfigs[configName].keyAlias = props['keyAlias'] 
     android.signingConfigs[configName].keyPassword = props['keyPassword'] 
    } 
} 

repositories { 
    mavenCentral() 
    maven { url 'https://maven.fabric.io/public' } 
} 


dependencies { 
    compile 'com.android.support:appcompat-v7:24.2.0' 
    compile 'com.android.support:support-annotations:24.2.0' 
    compile 'com.android.support:support-v13:24.2.0' 
    compile 'com.android.support:support-v4:24.2.0' 

    // --------- 

    compile 'com.github.tslamic.adn:library:1.0' 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { transitive = true } 
    compile 'com.jakewharton.timber:timber:2.5.1' 
    compile 'com.squareup:otto:1.3.6' 
    compile 'hu.supercluster:paperwork:1.2.7' 

    // --------- 

    apt "org.androidannotations:androidannotations:" + androidAnnotationsVersion 
    compile("org.androidannotations:androidannotations-api:" + androidAnnotationsAPIVersion) 

    testCompile 'junit:junit:4.11' 
    testCompile 'org.mockito:mockito-core:1.9.5' 
    testCompile('com.squareup:fest-android:1.0.+') { exclude module: 'support-v4' } 
    testCompile "org.robolectric:robolectric:3.0" 

    androidTestCompile 'com.google.guava:guava:14.0.1', 
      'com.squareup.dagger:dagger:1.1.0', 
      'org.hamcrest:hamcrest-integration:1.1', 
      'org.hamcrest:hamcrest-core:1.1', 
      'org.hamcrest:hamcrest-library:1.1', 
      'com.jakewharton.espresso:espresso:1.1-r3' 
} 

apt { 
    arguments { 
     resourcePackageName android.defaultConfig.applicationId 
     androidManifestFile variant.outputs[0]?.processResources?.manifestFile 
    } 
} 

apply plugin: 'idea' 

idea { 
    module { 
     //and some extra test source dirs 
     testSourceDirs += file('src/test') 
    } 
} 

apply from: 'build-time-tracker.gradle' 

答えて

1

。基本的にorg.gradle.internalのものはプライベートAPIの一部であり、gradleチームはgradleバージョン間でこれらのクラスを変更/削除することができます。理想的には、プラグインはクラスinternalを決して参照するべきではありません。 internal APIを参照しているプラ​​グインの作者は、このコードがGradleの新しいリリースで壊れる可能性があることを理解する必要があります。

プラグインの1つがinternal API(org.gradle.internal.TrueTimeProvider)を参照しているようですが、プラグインはGradleの1つのバージョンに対して作成され、別のバージョンのgradleで実行しています。

修正するには、例外をスローしているプラ​​グインを特定する必要があります(--stacktraceが役に立ちます)。次に、プラグインのバージョンをあなたのバージョンのgradleと互換性のあるものに変更するか、または実行中のgradleのバージョンを変更する必要があります。

+0

私の目標は、アプリケーションを実行するだけなので、カスタムの場所を新しいバージョンのgradle(3.5および4.0rc)に設定しようとしましたが、最後に同じ結果が得られました。 2.3.2ではなくgradleのbuild.gradleクラスパスを3.5.0に変更すると、ライブラリを見つけることができなくなります。これはgradle-3.5.0.jarを検索しており、そのファイルはgradleフォルダ内に見つかりません。 Androidモニターが空で、メッセージが表示されません。 徹底的な答えをいただきありがとうございます。 – user1938007

+1

ちょっと推測しますが、 'apply plugin:"ビルドタイムトラッカー "をコメントアウトしようと思います。また、動的なビルド番号には問題があります(例えば '0.5。+'と '1. +')。特定のバージョンを使用する方がはるかに良い –

+0

特定のバージョンを使用しようとしましたが、これは私のプロジェクトではありません。 「ビルドタイムトラッカー」をコメントアウトすると、元の問題が解決されました。どうもありがとうございました。 – user1938007

関連する問題