我无法在 IntelliJ 中运行或调试 Groovy 脚本。我收到错误:Error: Could not find or load main class org.codehaus.groovy.tools.GroovyStarter。从 cmd 运行脚本可以正常工作(我正在使用 groovyc 和 groovy 命令)。
import org.apache.pdfbox.pdmodel.PDDocument
import org.fit.pdfdom.PDFDomTree
import org.w3c.dom.Document
// load the PDF file using PDFBox
PDDocument pdf = PDDocument.load(new java.io.File("file.pdf"))
// create the DOM parser
PDFDomTree parser = new PDFDomTree()
// parse the file and get the DOM Document
Document dom = parser.createDOM(pdf)
Run Code Online (Sandbox Code Playgroud) 更新android studio和gradle后,我无法再编译(在发布模式下)我的应用程序.当我尝试生成APK时,我收到此错误:
找不到org.codehaus.groovy:groovy-all:2.4.12.在以下位置搜索:file:/Users/antonioleva/Library/Android/sdk/extras/m2repository/org/codehaus/groovy/groovy-all/2.4.12/groovy-all-2.4.12.pom文件:/ Users /antonioleva/Library/Android/sdk/extras/m2repository/org/codehaus/groovy/groovy-all/2.4.12/groovy-all-2.4.12.jar文件:/ Users/antonioleva/Library/Android/sdk/extras /google/m2repository/org/codehaus/groovy/groovy-all/2.4.12/groovy-all-2.4.12.pom文件:/ Users/antonioleva/Library/Android/sdk/extras/google/m2repository/org/codehaus /groovy/groovy-all/2.4.12/groovy-all-2.4.12.jar文件:/Users/antonioleva/Library/Android/sdk/extras/android/m2repository/org/codehaus/groovy/groovy-all/2.4 .12/groovy-all-2.4.12.pom文件:/Users/antonioleva/Library/Android/sdk/extras/android/m2repository/org/codehaus/groovy/groovy-all/2.4.12/groovy-all-2.4 .12.jar https://maven.google.com/org/codehaus/groovy/groovy-all/2.4.12/groovy-all-2.4.12.pom https://maven.google.com/org/codehaus /groovy/groovy-all/2.4.12/groovy-all-2.4.12.jar 必需:projec t:> com.android.tools.lint:lint-gradle:26.1.3
这是我的傻瓜:
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
}
apply plugin: 'android'
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.android.support:multidex:1.0.1') {
exclude module: 'support-v4'
exclude module: 'support-fragment'
exclude module: 'internal_impl-23.0.1'
}
implementation('com.android.support:support-v4:23.0.1') {
exclude module: 'support-v4'
exclude module: 'support-fragment'
exclude module: 'internal_impl-23.0.1'
}
implementation('com.android.support:appcompat-v7:23.0.1') {
exclude module: 'support-v4'
exclude …Run Code Online (Sandbox Code Playgroud)