离线运行Inspections(来自Jenkins)Android Studio 1.1 vs 1.5

时间:2016-01-06 13:04:06

标签: android android-studio intellij-idea jenkins

升级到Android Studio 1.5后 - inspections.sh停止运行并显示以下消息。

/Applications/Android\ Studio.app/Contents/bin/inspect.sh /Users/cosminstirbu/MyApp  /Users/cosminstirbu/MyApp/inspections_profile.xml /Users/cosminstirbu/MyApp/inspectionsresults -v2 -d /Users/cosminstirbu/MyApp/app
2016-01-06 14:46:20.696 studio[6443:163537] Value of STUDIO_JDK: (null)
2016-01-06 14:46:20.706 studio[6443:163547] fullFileName is: /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2016-01-06 14:46:20.706 studio[6443:163547] fullFileName exists: /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2016-01-06 14:46:20.707 studio[6443:163547] Value of STUDIO_VM_OPTIONS is (null)
2016-01-06 14:46:20.707 studio[6443:163547] Processing VMOptions file at /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2016-01-06 14:46:20.707 studio[6443:163547] Done
2016-01-06 14:46:20.707 studio[6443:163547] Processing VMOptions file at /Users/cosminstirbu/Library/Preferences/AndroidStudio1.5/studio.vmoptions
2016-01-06 14:46:20.707 studio[6443:163547] No content found
2016-01-06 14:46:20.708 studio[6443:163547] Processing VMOptions file at 
2016-01-06 14:46:20.708 studio[6443:163547] No content found
/Applications/Android Studio.app/Contents/bin/idea.properties: 'java.endorsed.dirs' already defined
Jan  6 14:46:26 users-MacBook-Pro.local studio[6443] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Jan  6 14:46:26 users-MacBook-Pro.local studio[6443] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Jan  6 14:46:26 users-MacBook-Pro.local studio[6443] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Jan  6 14:46:26 users-MacBook-Pro.local studio[6443] <Warning>: Invalid Connection ID 0
Starting up Android Studio 1.5.1 ...done.
Opening project...done.
Initializing project...Loaded profile 'MyApp' from file '/Users/cosminstirbu/MyApp/inspections_profile.xml'
done.
Inspecting with profile 'MyApp'
This project contains no modules. Inspection cannot proceed.

您可以在下面找到.gitignore文件

# Built application files
build

# Crashlytics configuations
com_crashlytics_export_strings.xml

# Local configuration file (sdk path, etc)
local.properties

# Gradle generated files
.gradle/

# Signing files
.signing/

# User-specific configurations
.idea/libraries/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
*.iml

# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

所以它说该项目不包含任何模块。

我的猜测是因为一些被忽略的文件,因为在我用Android Studio打开项目然后运行检查后,它就可以了。

https://www.jetbrains.com/ruby/help/running-inspections-offline.html中,它没有说明应该提交哪些文件。我绝对不想提交workspace.xml和.iml文件。

1 个答案:

答案 0 :(得分:1)

检查需要IntelliJ IDEA项目才能运行。至少,您需要.iml文件,.idea / modules.xml以及.idea / libraries下的所有内容。与.gitignore文件中的注释相反,这些文件都不包含特定于用户的配置,所有这些文件都设计为签入VCS并与其他用户共享。

(如果您使用Gradle,则无需签入* .iml和其他文件,因为在IDE中打开build.gradle时可以生成它们,但离线检查不支持构建。 gradle import,并要求存在实际的项目和模块文件。)

您不需要workspace.xml文件,它实际上包含您的用户特定配置。