【问题标题】:roboblender-3.0.1.jar: not included in Android: javax.tools. Referenced from com.google.inject.blender.AnnotationDatabaseGeneratorroboblender-3.0.1.jar:不包含在 Android 中:javax.tools。引用自 com.google.inject.blender.AnnotationDatabaseGenerator
【发布时间】:2015-03-08 14:29:15
【问题描述】:

我尝试构建我的 android 项目并得到:

Information:Gradle: Executing tasks: [clean, :app:compileDebugSources]
Information:1/10/15, 11:13 AM - Compilation completed successfully in 5 sec

然后我尝试将其部署到我的设备并获得:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lint'.
> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, or add the following to your build script to proceed with errors:
  ...
  android {
      lintOptions {
          abortOnError false
      }
  }

然后我查看 lint 报告并查看:

InvalidPackage: Package not included in Android
../../../../../.gradle/caches/modules-2/files-2.1/org.roboguice/roboblender/3.0.1/d629079b9bfa8d889ec833d1eb747e89cf789bfa/roboblender-3.0.1.jar: Invalid package reference in library; not included in Android: javax.tools. Referenced from com.google.inject.blender.AnnotationDatabaseGenerator.
../../../../../.gradle/caches/modules-2/files-2.1/org.roboguice/roboguice/3.0.1/24e814f35d5cc28eaa7e9f07a50ea69deeb2b544/roboguice-3.0.1.jar: Invalid package reference in library; not included in Android: javax.inject. Referenced from com.google.inject.Scopes.3.
../../../../../.gradle/caches/modules-2/files-2.1/org.apache.velocity/velocity/1.7/2ceb567b8f3f21118ecdec129fe1271dbc09aa7a/velocity-1.7.jar: Invalid package reference in library; not included in Android: javax.naming. Referenced from org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader.
../../../../../.gradle/caches/modules-2/files-2.1/org.apache.velocity/velocity/1.7/2ceb567b8f3f21118ecdec129fe1271dbc09aa7a/velocity-1.7.jar: Invalid package reference in library; not included in Android: javax.servlet.http. Referenced from org.apache.velocity.servlet.VelocityServlet.
../../../../../.gradle/caches/modules-2/files-2.1/org.apache.velocity/velocity/1.7/2ceb567b8f3f21118ecdec129fe1271dbc09aa7a/velocity-1.7.jar: Invalid package reference in library; not included in Android: javax.servlet. Referenced from org.apache.velocity.runtime.log.ServletLogChute.

我在 mac 上工作,roboguice 曾经工作到昨晚。

我有 VPN 代理,因为它是我的工作 mac。我试图关闭和打开它。没有任何帮助。

没有它,我通常都能顺利上网。

会出什么问题?

【问题讨论】:

    标签: android proxy gradle vpn roboguice


    【解决方案1】:

    尝试将 lint 选项添加到项目的 build.gradle 文件中。

     android {
      // your build config
      defaultConfig { ... }
      signingConfigs { ... }
      compileOptions { ... }
      buildTypes { ... }
      // This is important, it will run lint checks but won't abort build
      lintOptions {
          abortOnError false
      }
    }
    

    如果这不起作用,请尝试将其替换为

    android {
      // your build config
      defaultConfig { ... }
      signingConfigs { ... }
      compileOptions { ... }
      buildTypes { ... }
      // This is important, it will run lint checks but won't abort build
      lintOptions {
          checkReleaseBuilds false
      }
    }
    

    【讨论】:

      猜你喜欢
      • 2012-12-22
      • 1970-01-01
      • 2011-07-03
      • 2011-10-17
      • 1970-01-01
      • 1970-01-01
      • 2013-03-21
      • 2016-12-30
      • 1970-01-01
      相关资源
      最近更新 更多