java – 为JellyRefreshLayout模块导入新的Android模块失败

前端之家收集整理的这篇文章主要介绍了java – 为JellyRefreshLayout模块导入新的Android模块失败前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在导入JellyRefreshLayout作为模块(对于一些更新)

检查此链接
https://github.com/allan1st/JellyRefreshLayout

但我总是得到这个毕业生的错误

信息:Gradle任务[:app:generateDebugSources,

  1. :app:mockableAndroidJar,:app:prepareDebugUnitTestDependencies,:app:generateDebugAndroidTestSources,:jellyrefresh:generateDebugSources,:jellyrefresh:mockableAndroidJar,:jellyrefresh:prepareDebugUnitTestDependencies,:jellyrefresh:generateDebugAndroidTestSources]
  2. extractDebugAnnotations is incompatible with java 8 sources and has been disabled.
  3. extractReleaseAnnotations is incompatible with java 8 sources and has been disabled.
  4. :jellyrefresh:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
  5. :jellyrefresh:compileReleaseJavaWithJavac UP-TO-DATE
  6. :jellyrefresh:compileRetrolambdaRelease Failed
  7.  
  8. Error:Execution Failed for task ':jellyrefresh:compileRetrolambdaRelease'.
  9. > Could not resolve all dependencies for configuration ':jellyrefresh:retrolambdaConfig'.
  10. > Could not resolve net.orfjackal.retrolambda:retrolambda:2.0.3.
  11. required by:
  12. JellyRefreshLayout-master:jellyrefresh:unspecified
  13. > No cached version of net.orfjackal.retrolambda:retrolambda:2.0.3 available for offline mode.
  14. > No cached version of net.orfjackal.retrolambda:retrolambda:2.0.3 available for offline mode.

项目毕业生建设:

  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2.  
  3. buildscript {
  4. repositories {
  5. jcenter()
  6. mavenCentral()
  7. }
  8. dependencies {
  9. classpath 'com.android.tools.build:gradle:2.1.3'
  10. classpath 'me.tatarka:gradle-retrolambda:3.2.0'
  11. }
  12. }
  13.  
  14. allprojects {
  15. repositories {
  16. jcenter()
  17. }
  18. }

应用程序毕业:

  1. apply plugin: 'com.android.application'
  2.  
  3. android {
  4. compileSdkVersion 23
  5. buildToolsVersion "23.0.2"
  6.  
  7. defaultConfig {
  8. applicationId "uk.co.imallan.jellyrefreshlayout"
  9. minSdkVersion 19
  10. targetSdkVersion 22
  11. versionCode 1
  12. versionName "1.0"
  13. }
  14. buildTypes {
  15. release {
  16. minifyEnabled false
  17. proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
  18. }
  19. }
  20. }
  21.  
  22.  
  23. dependencies {
  24. compile fileTree(dir: 'libs',include: ['*.jar'])
  25. compile 'com.android.support:appcompat-v7:23.3.0'
  26. compile project(":jellyrefresh")
  27. }

图书馆模特:

  1. repositories {
  2. mavenCentral()
  3. }
  4.  
  5. apply plugin: 'com.android.library'
  6. apply plugin: 'me.tatarka.retrolambda'
  7.  
  8. android {
  9. compileSdkVersion 23
  10. buildToolsVersion "23.0.2"
  11.  
  12. defaultConfig {
  13. minSdkVersion 19
  14. targetSdkVersion 22
  15. versionCode 1
  16. versionName "1.0"
  17. }
  18.  
  19. compileOptions {
  20. sourceCompatibility JavaVersion.VERSION_1_8
  21. targetCompatibility JavaVersion.VERSION_1_8
  22. }
  23. }
  24.  
  25. dependencies {
  26. compile fileTree(dir: 'libs',include: ['*.jar'])
  27. compile 'com.android.support:appcompat-v7:23.3.0'
  28. }

注意:我的项目JDK选择和默认JDK是:
/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home

请指教 !
谢谢 !

解决方法

现在解决

问题是:internal_impl.jar有时不在retronambda类路径上.
因为以下之一:

因为在第二次执行中可能会更新依赖关系.
>也许这是Gradle Android插件错误.

解决方案是:
我运行毕业生清洁和组装在命令从毕业生终端同步毕业:

./gradlew clean assembleDebug

从Gradle终端.

请检查这个有用的对话:

https://github.com/evant/gradle-retrolambda/issues/105

猜你在找的Android相关文章