我是Android Studio的新用户,我在尝试将Android Studio项目导入到其他PC上的Android Studio时遇到了严重问题.一般来说,我的Gradle不想构建项目,它是由路径问题引起的.
错误日志:
Failed to import Gradle project: Could not fetch model of type 'IdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
Build file 'E:\Projects\MenuMenu\EventGame\build.gradle' line: 1
A problem occurred evaluating project ':EventGame'.
A problem occurred evaluating project ':EventGame'.
The SDK directory 'E:\Program Files (x86)\Android\android-studio\bin' does not exist
Run Code Online (Sandbox Code Playgroud)
我的Android-Studio SDK在目录中:
E:\Program Files (x86)\Android\android-studio\sdk
Run Code Online (Sandbox Code Playgroud)
我在各种帖子中发现了类似的问题,你可以在local.properties文件中更改sdk的路径.我的目前看起来像那样:
sdk.dir=
Run Code Online (Sandbox Code Playgroud)
所以它是空的,但仍然默认路径是SOMEHOW设置为"E:\ Program Files(x86)\ Android\android-studio\bin",我不知道如何更改它.如果我尝试添加到sdk.dir实际路径错误是相同的但错误的路径看起来像那样.
The SDK directory 'E:\Program Files (x86)\Android\android-studio\bin"E:\Program Files (x86)\Android\android-studio\sdk"' does not exist
Run Code Online (Sandbox Code Playgroud)
我可以通过网络找到90%的原因通过添加以下内容来解决问题:sdk.dir =/Applications/Android Studio.app/sdk
但是然后目录设置为E:\ Program Files(x86)\ Android\android-studio\bin\Applications\Android Studio.app\sdk,我的电脑中不存在类似的东西.
你知道如何解决这个问题吗?有没有办法改变这个默认路径?我也得到错误:
E:\Projects\MenuMenu\EventGame\build.gradle
Gradle: …Run Code Online (Sandbox Code Playgroud) 回购:https : //github.com/FisherKK/F1sherKK-Online
我是 Jekyll 的新手,并在一次提交中推动了许多更改,现在我很难说出问题出在哪里。我正在编辑最小布局。GitHub 返回一般错误:
页面构建失败。有关更多信息,请参阅 https://help.github.com/articles/troubleshooting-github-pages-builds/。
有关 Jekyll 故障排除的信息,请参阅:
https://help.github.com/articles/troubleshooting-jekyll-builds
如果您有任何问题,可以通过回复此电子邮件与我们联系。
我运行bundle update没有问题,页面本地工作:
$ bundle exec jekyll build Configuration file: /Users/F1sherKK/Dev/F1sherKK-Online/_config.yml
Source: /Users/F1sherKK/Dev/F1sherKK-Online
Destination: /Users/F1sherKK/Dev/F1sherKK-Online/_site Incremental build: disabled. Enable with --incremental
Generating...
done in 0.523 seconds.
Auto-regeneration: disabled. Use --watch to enable.
Run Code Online (Sandbox Code Playgroud)
我尝试过以下事情:
gh-pages分支。_起始文件夹(除了 Jekyll 使用的文件夹).nojekyll文件,但我的网站完全崩溃(404,白色,无布局),所以我删除了它。categories: machine_learning …我正在使用Roman Mazur 的勺子gradle插件。我能够一次运行所有测试,但我无法指定要启动的“组”测试。目前我的勺子设置看起来像这样:
spoon {
debug = true
baseOutputDir = file("$buildDir/spoon-log")
if (project.hasProperty('spoonClassName')) {
className = project.spoonClassName
if (project.hasProperty('spoonMethodName')) {
methodName = project.spoonMethodName
}
}
adbTimeout = 60 * 60;
}
Run Code Online (Sandbox Code Playgroud)
我的测试位于包中:
我的目标是创建单独的 gradle 任务,这些任务依赖于勺子分别从每个包启动测试。Roman 给了我们参数instrumentationArgs,它应该能够编辑勺子内的一些属性。
正如我在勺子的主 git 上看到的那样,你可以指定包,勺子运行器应该在其中查找你的测试,示例如下:
--e package=com.mypackage.unit_tests
Run Code Online (Sandbox Code Playgroud)
所以我的想法是把这个属性放到 instrumentationArgs 中。因此,我创建了这样的勺子任务:
task spoonAuthFlowTests(type: GradleBuild, dependsOn: ['spoon']) {
spoon {
instrumentationArgs = ["package=com.myapp.instrumentation.flowtests.AuthFlowTests"]
noAnimations = true;
}
}
task spoonFlowTests(type: GradleBuild, dependsOn: ['spoon']) {
spoon {
instrumentationArgs = ["package=com.myapp.instrumentation.flowtests"]
noAnimations = true; …Run Code Online (Sandbox Code Playgroud) 有人可以向我解释为什么结果会有所不同.
C++中的代码:
MatrixXcd testTest;
testTest.resize(3,3);
testTest.real()(0,0) = 1;
testTest.real()(0,1) = 2;
testTest.real()(0,2) = 3;
testTest.real()(1,0) = 1;
testTest.real()(1,1) = 2;
testTest.real()(1,2) = 3;
testTest.real()(2,0) = 1;
testTest.real()(2,1) = 2;
testTest.real()(2,2) = 3;
testTest.imag()(0,0) = 1;
testTest.imag()(0,1) = 2;
testTest.imag()(0,2) = 3;
testTest.imag()(1,0) = 1;
testTest.imag()(1,1) = 2;
testTest.imag()(1,2) = 3;
testTest.imag()(2,0) = 1;
testTest.imag()(2,1) = 2;
testTest.imag()(2,2) = 3;
cout<< endl << testTest << endl;
cout<< endl << testTest.transpose() << endl;
cout<< endl << testTest*testTest.transpose() << endl;
cout<< endl << …Run Code Online (Sandbox Code Playgroud) 我想为我的Android应用程序创建一个构建服务器。我正在与TeamCity合作。我的问题是:
我需要做的是在构建应用程序时使构建服务器使用环境位置(ANDROID_HOME)。我已经尝试了什么?
sdk.dir = ANDROID_HOME
结果-错误:
SDK目录“ E:\ TeamCity \ buildAgent \ work \ a6d423a9d6e29c40 \ ANDROID_HOME”不存在。
如您所见,服务器之前添加了一些奇怪的目录。$ ANDROID_HOME或%ANDROID_HOME%也是如此。
sdk.dir = /程序文件(x86)/ android-studio / sdk
然后服务器构建项目,一切正常。ANDROID_HOME环境变量与此位置相同。
找不到SDK位置。在local.properties文件中使用sdk.dir或使用ANDROID_HOME环境变量来定义位置。
所以我的理解是:如果我的项目中没有local.properties,它将在ANDROID_HOME环境变量中查找SDK路径。就像我说的那样,在我的服务器上设置了环境变量,并且已经检查了很多次。没用 (我也在MAC X OS上尝试过,终端将ANDROID_HOME显示为/ Applications / Android Studio.app/sdk,但例如,仅当我在local.properties中对路径进行硬编码时,Android Studio才能构建项目。它不希望接受ANDROID_HOME变量。)
如何在local.properties中设置环境变量,这样我就不必对其进行硬编码来使其起作用?
我想在启动服务器的 Jenkins 上工作(WireMock 上的 MockServer)。
服务器从 *.jar 文件启动,从终端启动。
java -jar serverLaunch.jar
Run Code Online (Sandbox Code Playgroud)
它接管了我的控制台。为了避免这种情况,我修改了它并执行以下操作:
java -jar serverLaunch.jar &>/dev/null &
Run Code Online (Sandbox Code Playgroud)
这在我的本地 PC 上对我有用。现在我想把它移到詹金斯。
如果我尝试从 Jenkins Job 中的“Shell 命令”块执行此操作,则:
一种) java -jar serverLaunch.jar
b) java -jar serverLaunch.jar &>/dev/null &
我也在 .sh 脚本和 .rb 脚本中包装了这个命令。知道如何使它工作吗?
我试过这个:https : //wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build
然后在詹金斯的“Shell 脚本”中:
daemonize -E BUILD_ID=dontKillMe /bin/bash launch.sh
Run Code Online (Sandbox Code Playgroud)
但它也通过了,但服务器不活跃。