- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试从物理设备上的android studio运行该应用程序。但是每次我这样做时,Gradle Build
都会显示此错误
Information:Gradle tasks [:app:assembleDebug]
Information:BUILD SUCCESSFUL in 10s
Error:Already finished
Information:BUILD FAILED in 10s
Information:1 error
Information:0 warnings
Information:See complete output in console
.gradle
文件夹,我尝试将其删除,但每次
Rebuild Project/Clean Project
时,该文件夹都会自动出现。
./gradlew assembleDebug --info
后,日志显示如下:
Initialized native services in: /home/shaloin/.gradle/native
Found daemon DaemonInfo{pid=17048, address=[fc6fb39e-af80-499f-a671-d7966fec4f29 port:33345, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1519376060898, context=DefaultDaemonContext[uid=b05f2429-3b72-4dbb-9b66-3861bb909eee,javaHome=/usr/local/android-studio/jre,daemonRegistryDir=/home/shaloin/.gradle/daemon,pid=17048,idleTimeout=10800000,daemonOpts=-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=/usr/lib/jvm/java-8-oracle,daemonRegistryDir=/home/shaloin/.gradle/daemon,pid=553,idleTimeout=null,daemonOpts=-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=b05f2429-3b72-4dbb-9b66-3861bb909eee,javaHome=/usr/local/android-studio/jre,daemonRegistryDir=/home/shaloin/.gradle/daemon,pid=17048,idleTimeout=10800000,daemonOpts=-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant]
Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 335). The daemon log file: /home/shaloin/.gradle/daemon/4.1/daemon-335.out.log
Starting 2nd build in daemon [uptime: 3 mins 8.377 secs, performance: 99%, no major garbage collections]
Using 4 worker leases.
Creating new cache for fileHashes, path /home/shaloin/AndroidStudioProjects/CodeSearch/.gradle/4.1/fileHashes/fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@70f708a8
Creating new cache for plugin-use-metadata, path /home/shaloin/.gradle/caches/4.1/plugin-resolution/plugin-use-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@79864311
Creating new cache for client-status, path /home/shaloin/.gradle/caches/4.1/plugin-resolution/client-status.bin, access org.gradle.cache.internal.DefaultCacheAccess@79864311
Starting Build
Settings evaluated using settings file '/home/shaloin/AndroidStudioProjects/CodeSearch/settings.gradle'.
Projects loaded. Root project using build file '/home/shaloin/AndroidStudioProjects/CodeSearch/build.gradle'.
Included projects: [root project 'CodeSearch', project ':app']
> Configure project :
Evaluating root project 'CodeSearch' using build file '/home/shaloin/AndroidStudioProjects/CodeSearch/build.gradle'.
Creating new cache for metadata-1.1/results, path /home/shaloin/.gradle/caches/transforms-1/metadata-1.1/results.bin, access org.gradle.cache.internal.DefaultCacheAccess@740f0509
Creating new cache for metadata-2.23/module-metadata, path /home/shaloin/.gradle/caches/modules-2/metadata-2.23/module-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@6663ad7c
Creating new cache for metadata-2.23/artifact-at-repository, path /home/shaloin/.gradle/caches/modules-2/metadata-2.23/artifact-at-repository.bin, access org.gradle.cache.internal.DefaultCacheAccess@6663ad7c
> Configure project :app
Evaluating project ':app' using build file '/home/shaloin/AndroidStudioProjects/CodeSearch/app/build.gradle'.
Creating configuration androidTestUtil
Creating configuration compile
Creating configuration apk
Creating configuration provided
Creating configuration api
Creating configuration implementation
Creating configuration runtimeOnly
Creating configuration compileOnly
Creating configuration wearApp
Creating configuration annotationProcessor
Creating configuration androidTestCompile
Creating configuration androidTestApk
Creating configuration androidTestProvided
Creating configuration androidTestApi
Creating configuration androidTestImplementation
Creating configuration androidTestRuntimeOnly
Creating configuration androidTestCompileOnly
Creating configuration androidTestWearApp
Creating configuration androidTestAnnotationProcessor
Creating configuration testCompile
Creating configuration testApk
Creating configuration testProvided
Creating configuration testApi
Creating configuration testImplementation
Creating configuration testRuntimeOnly
Creating configuration testCompileOnly
Creating configuration testWearApp
Creating configuration testAnnotationProcessor
Creating configuration debugCompile
Creating configuration debugApk
Creating configuration debugProvided
Creating configuration debugApi
Creating configuration debugImplementation
Creating configuration debugRuntimeOnly
Creating configuration debugCompileOnly
Creating configuration debugWearApp
Creating configuration debugAnnotationProcessor
Creating configuration androidTestDebugCompile
Creating configuration androidTestDebugApk
Creating configuration androidTestDebugProvided
Creating configuration androidTestDebugApi
Creating configuration androidTestDebugImplementation
Creating configuration androidTestDebugRuntimeOnly
Creating configuration androidTestDebugCompileOnly
Creating configuration androidTestDebugWearApp
Creating configuration androidTestDebugAnnotationProcessor
Creating configuration testDebugCompile
Creating configuration testDebugApk
Creating configuration testDebugProvided
Creating configuration testDebugApi
Creating configuration testDebugImplementation
Creating configuration testDebugRuntimeOnly
Creating configuration testDebugCompileOnly
Creating configuration testDebugWearApp
Creating configuration testDebugAnnotationProcessor
Creating configuration releaseCompile
Creating configuration releaseApk
Creating configuration releaseProvided
Creating configuration releaseApi
Creating configuration releaseImplementation
Creating configuration releaseRuntimeOnly
Creating configuration releaseCompileOnly
Creating configuration releaseWearApp
Creating configuration releaseAnnotationProcessor
Creating configuration testReleaseCompile
Creating configuration testReleaseApk
Creating configuration testReleaseProvided
Creating configuration testReleaseApi
Creating configuration testReleaseImplementation
Creating configuration testReleaseRuntimeOnly
Creating configuration testReleaseCompileOnly
Creating configuration testReleaseWearApp
Creating configuration testReleaseAnnotationProcessor
Parsing the SDK, no caching allowed
SDK initialized in 17 ms
Using incremental javac compilation for :app debug.
Using incremental javac compilation for :app debugUnitTest.
Using incremental javac compilation for :app release.
Using incremental javac compilation for :app releaseUnitTest.
Using incremental javac compilation for :app debugAndroidTest.
All projects evaluated.
Selected primary task 'assembleDebug' from project :
Creating new cache for annotation-processors, path /home/shaloin/AndroidStudioProjects/CodeSearch/.gradle/4.1/fileContent/annotation-processors.bin, access org.gradle.cache.internal.DefaultCacheAccess@72abf1bc
Tasks to be executed: [task ':app:preBuild', task ':app:preDebugBuild', task ':app:compileDebugAidl', task ':app:compileDebugRenderscript', task ':app:checkDebugManifest', task ':app:generateDebugBuildConfig', task ':app:prepareLintJar', task ':app:generateDebugResValues', task ':app:generateDebugResources', task ':app:mergeDebugResources', task ':app:createDebugCompatibleScreenManifests', task ':app:processDebugManifest', task ':app:splitsDiscoveryTaskDebug', task ':app:processDebugResources', task ':app:generateDebugSources', task ':app:javaPreCompileDebug', task ':app:compileDebugJavaWithJavac', task ':app:compileDebugNdk', task ':app:compileDebugSources', task ':app:mergeDebugShaders', task ':app:compileDebugShaders', task ':app:generateDebugAssets', task ':app:mergeDebugAssets', task ':app:transformClassesWithDexBuilderForDebug', task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug', task ':app:transformDexArchiveWithDexMergerForDebug', task ':app:mergeDebugJniLibFolders', task ':app:transformNativeLibsWithMergeJniLibsForDebug', task ':app:transformNativeLibsWithStripDebugSymbolForDebug', task ':app:processDebugJavaRes', task ':app:transformResourcesWithMergeJavaResForDebug', task ':app:validateSigningDebug', task ':app:packageDebug', task ':app:assembleDebug']
Creating new cache for resourceHashesCache, path /home/shaloin/AndroidStudioProjects/CodeSearch/.gradle/4.1/fileHashes/resourceHashesCache.bin, access org.gradle.cache.internal.DefaultCacheAccess@70f708a8
Creating new cache for fileSnapshots, path /home/shaloin/AndroidStudioProjects/CodeSearch/.gradle/4.1/taskHistory/fileSnapshots.bin, access org.gradle.cache.internal.DefaultCacheAccess@37a72cc7
Creating new cache for taskHistory, path /home/shaloin/AndroidStudioProjects/CodeSearch/.gradle/4.1/taskHistory/taskHistory.bin, access org.gradle.cache.internal.DefaultCacheAccess@37a72cc7
:app:preBuild (Thread[Task worker for ':',5,main]) started.
> Task :app:preBuild
Skipping task ':app:preBuild' as it has no actions.
:app:preBuild (Thread[Task worker for ':',5,main]) completed. Took 0.0 secs.
:app:preDebugBuild (Thread[Task worker for ':',5,main]) started.
> Task :app:preDebugBuild
Putting task artifact state for task ':app:preDebugBuild' into context took 0.0 secs.
Creating new cache for metadata-2.23/module-artifacts, path /home/shaloin/.gradle/caches/modules-2/metadata-2.23/module-artifacts.bin, access org.gradle.cache.internal.DefaultCacheAccess@6663ad7c
Skipping task ':app:preDebugBuild' as it is up-to-date (took 0.104 secs).
:app:preDebugBuild (Thread[Task worker for ':',5,main]) completed. Took 0.106 secs.
:app:compileDebugAidl (Thread[Task worker for ':' Thread 2,5,main]) started.
> Task :app:compileDebugAidl
Putting task artifact state for task ':app:compileDebugAidl' into context took 0.0 secs.
Skipping task ':app:compileDebugAidl' as it is up-to-date (took 0.012 secs).
:app:compileDebugAidl (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.013 secs.
:app:compileDebugRenderscript (Thread[Task worker for ':' Thread 2,5,main]) started.
> Task :app:compileDebugRenderscript
Putting task artifact state for task ':app:compileDebugRenderscript' into context took 0.0 secs.
Skipping task ':app:compileDebugRenderscript' as it is up-to-date (took 0.006 secs).
:app:compileDebugRenderscript (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.007 secs.
:app:checkDebugManifest (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:checkDebugManifest
Putting task artifact state for task ':app:checkDebugManifest' into context took 0.0 secs.
Skipping task ':app:checkDebugManifest' as it is up-to-date (took 0.001 secs).
:app:checkDebugManifest (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.001 secs.
:app:generateDebugBuildConfig (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:generateDebugBuildConfig
Putting task artifact state for task ':app:generateDebugBuildConfig' into context took 0.0 secs.
Skipping task ':app:generateDebugBuildConfig' as it is up-to-date (took 0.004 secs).
:app:generateDebugBuildConfig (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.004 secs.
:app:prepareLintJar (Thread[Daemon worker Thread 2,5,main]) started.
> Task :app:prepareLintJar
Putting task artifact state for task ':app:prepareLintJar' into context took 0.0 secs.
Skipping task ':app:prepareLintJar' as it is up-to-date (took 0.005 secs).
:app:prepareLintJar (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.005 secs.
:app:generateDebugResValues (Thread[Daemon worker Thread 2,5,main]) started.
> Task :app:generateDebugResValues
Putting task artifact state for task ':app:generateDebugResValues' into context took 0.0 secs.
Skipping task ':app:generateDebugResValues' as it is up-to-date (took 0.001 secs).
:app:generateDebugResValues (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.002 secs.
:app:generateDebugResources (Thread[Daemon worker Thread 2,5,main]) started.
> Task :app:generateDebugResources
Skipping task ':app:generateDebugResources' as it has no actions.
:app:generateDebugResources (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.001 secs.
:app:mergeDebugResources (Thread[Daemon worker Thread 2,5,main]) started.
> Task :app:mergeDebugResources
Putting task artifact state for task ':app:mergeDebugResources' into context took 0.0 secs.
Skipping task ':app:mergeDebugResources' as it is up-to-date (took 0.042 secs).
:app:mergeDebugResources (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.043 secs.
:app:createDebugCompatibleScreenManifests (Thread[Task worker for ':' Thread 2,5,main]) started.
> Task :app:createDebugCompatibleScreenManifests
Putting task artifact state for task ':app:createDebugCompatibleScreenManifests' into context took 0.0 secs.
Skipping task ':app:createDebugCompatibleScreenManifests' as it is up-to-date (took 0.001 secs).
:app:createDebugCompatibleScreenManifests (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.002 secs.
:app:processDebugManifest (Thread[Task worker for ':' Thread 2,5,main]) started.
> Task :app:processDebugManifest
Putting task artifact state for task ':app:processDebugManifest' into context took 0.0 secs.
Skipping task ':app:processDebugManifest' as it is up-to-date (took 0.005 secs).
:app:processDebugManifest (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.008 secs.
:app:splitsDiscoveryTaskDebug (Thread[Task worker for ':' Thread 2,5,main]) started.
> Task :app:splitsDiscoveryTaskDebug
Putting task artifact state for task ':app:splitsDiscoveryTaskDebug' into context took 0.0 secs.
Skipping task ':app:splitsDiscoveryTaskDebug' as it is up-to-date (took 0.001 secs).
:app:splitsDiscoveryTaskDebug (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.001 secs.
:app:processDebugResources (Thread[Task worker for ':' Thread 2,5,main]) started.
> Task :app:processDebugResources
Putting task artifact state for task ':app:processDebugResources' into context took 0.001 secs.
Skipping task ':app:processDebugResources' as it is up-to-date (took 0.028 secs).
:app:processDebugResources (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.029 secs.
:app:generateDebugSources (Thread[Daemon worker Thread 2,5,main]) started.
> Task :app:generateDebugSources
Skipping task ':app:generateDebugSources' as it has no actions.
:app:generateDebugSources (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.0 secs.
:app:javaPreCompileDebug (Thread[Daemon worker Thread 2,5,main]) started.
> Task :app:javaPreCompileDebug
Putting task artifact state for task ':app:javaPreCompileDebug' into context took 0.0 secs.
Skipping task ':app:javaPreCompileDebug' as it is up-to-date (took 0.008 secs).
:app:javaPreCompileDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.009 secs.
:app:compileDebugJavaWithJavac (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:compileDebugJavaWithJavac
Putting task artifact state for task ':app:compileDebugJavaWithJavac' into context took 0.001 secs.
file or directory '/home/shaloin/AndroidStudioProjects/CodeSearch/app/src/debug/java', not found
Skipping task ':app:compileDebugJavaWithJavac' as it is up-to-date (took 0.009 secs).
:app:compileDebugJavaWithJavac (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.012 secs.
:app:compileDebugNdk (Thread[Task worker for ':',5,main]) started.
> Task :app:compileDebugNdk
Putting task artifact state for task ':app:compileDebugNdk' into context took 0.0 secs.
Skipping task ':app:compileDebugNdk' as it has no source files and no previous output files.
:app:compileDebugNdk (Thread[Task worker for ':',5,main]) completed. Took 0.001 secs.
:app:compileDebugSources (Thread[Task worker for ':',5,main]) started.
> Task :app:compileDebugSources
Skipping task ':app:compileDebugSources' as it has no actions.
:app:compileDebugSources (Thread[Task worker for ':',5,main]) completed. Took 0.0 secs.
:app:mergeDebugShaders (Thread[Task worker for ':',5,main]) started.
> Task :app:mergeDebugShaders
Putting task artifact state for task ':app:mergeDebugShaders' into context took 0.0 secs.
Skipping task ':app:mergeDebugShaders' as it is up-to-date (took 0.001 secs).
:app:mergeDebugShaders (Thread[Task worker for ':',5,main]) completed. Took 0.002 secs.
:app:compileDebugShaders (Thread[Task worker for ':',5,main]) started.
> Task :app:compileDebugShaders
Putting task artifact state for task ':app:compileDebugShaders' into context took 0.0 secs.
Skipping task ':app:compileDebugShaders' as it is up-to-date (took 0.001 secs).
:app:compileDebugShaders (Thread[Task worker for ':',5,main]) completed. Took 0.001 secs.
:app:generateDebugAssets (Thread[Task worker for ':',5,main]) started.
> Task :app:generateDebugAssets
Skipping task ':app:generateDebugAssets' as it has no actions.
:app:generateDebugAssets (Thread[Task worker for ':',5,main]) completed. Took 0.0 secs.
:app:mergeDebugAssets (Thread[Task worker for ':',5,main]) started.
> Task :app:mergeDebugAssets
Putting task artifact state for task ':app:mergeDebugAssets' into context took 0.0 secs.
Skipping task ':app:mergeDebugAssets' as it is up-to-date (took 0.006 secs).
:app:mergeDebugAssets (Thread[Task worker for ':',5,main]) completed. Took 0.006 secs.
:app:transformClassesWithDexBuilderForDebug (Thread[Task worker for ':',5,main]) started.
> Task :app:transformClassesWithDexBuilderForDebug
Putting task artifact state for task ':app:transformClassesWithDexBuilderForDebug' into context took 0.0 secs.
Skipping task ':app:transformClassesWithDexBuilderForDebug' as it is up-to-date (took 0.015 secs).
:app:transformClassesWithDexBuilderForDebug (Thread[Task worker for ':',5,main]) completed. Took 0.015 secs.
:app:transformDexArchiveWithExternalLibsDexMergerForDebug (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug
Putting task artifact state for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug' into context took 0.0 secs.
Skipping task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug' as it is up-to-date (took 0.005 secs).
:app:transformDexArchiveWithExternalLibsDexMergerForDebug (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.006 secs.
:app:transformDexArchiveWithDexMergerForDebug (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:transformDexArchiveWithDexMergerForDebug
Putting task artifact state for task ':app:transformDexArchiveWithDexMergerForDebug' into context took 0.0 secs.
Skipping task ':app:transformDexArchiveWithDexMergerForDebug' as it is up-to-date (took 0.004 secs).
:app:transformDexArchiveWithDexMergerForDebug (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.005 secs.
:app:mergeDebugJniLibFolders (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:mergeDebugJniLibFolders
Putting task artifact state for task ':app:mergeDebugJniLibFolders' into context took 0.0 secs.
Skipping task ':app:mergeDebugJniLibFolders' as it is up-to-date (took 0.001 secs).
:app:mergeDebugJniLibFolders (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.003 secs.
:app:transformNativeLibsWithMergeJniLibsForDebug (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:transformNativeLibsWithMergeJniLibsForDebug
Putting task artifact state for task ':app:transformNativeLibsWithMergeJniLibsForDebug' into context took 0.0 secs.
Skipping task ':app:transformNativeLibsWithMergeJniLibsForDebug' as it is up-to-date (took 0.012 secs).
:app:transformNativeLibsWithMergeJniLibsForDebug (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.013 secs.
:app:transformNativeLibsWithStripDebugSymbolForDebug (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:transformNativeLibsWithStripDebugSymbolForDebug
Putting task artifact state for task ':app:transformNativeLibsWithStripDebugSymbolForDebug' into context took 0.0 secs.
Skipping task ':app:transformNativeLibsWithStripDebugSymbolForDebug' as it is up-to-date (took 0.011 secs).
:app:transformNativeLibsWithStripDebugSymbolForDebug (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.012 secs.
:app:processDebugJavaRes (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:processDebugJavaRes
Putting task artifact state for task ':app:processDebugJavaRes' into context took 0.0 secs.
Skipping task ':app:processDebugJavaRes' as it has no source files and no previous output files.
:app:processDebugJavaRes (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.002 secs.
:app:transformResourcesWithMergeJavaResForDebug (Thread[Task worker for ':' Thread 3,5,main]) started.
> Task :app:transformResourcesWithMergeJavaResForDebug
Putting task artifact state for task ':app:transformResourcesWithMergeJavaResForDebug' into context took 0.0 secs.
Skipping task ':app:transformResourcesWithMergeJavaResForDebug' as it is up-to-date (took 0.013 secs).
:app:transformResourcesWithMergeJavaResForDebug (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.015 secs.
:app:validateSigningDebug (Thread[Daemon worker Thread 2,5,main]) started.
> Task :app:validateSigningDebug
Putting task artifact state for task ':app:validateSigningDebug' into context took 0.0 secs.
Executing task ':app:validateSigningDebug' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:app:validateSigningDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.009 secs.
:app:packageDebug (Thread[Daemon worker Thread 2,5,main]) started.
> Task :app:packageDebug
Putting task artifact state for task ':app:packageDebug' into context took 0.0 secs.
Skipping task ':app:packageDebug' as it is up-to-date (took 0.023 secs).
:app:packageDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.027 secs.
:app:assembleDebug (Thread[Daemon worker Thread 2,5,main]) started.
> Task :app:assembleDebug
Skipping task ':app:assembleDebug' as it has no actions.
:app:assembleDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.001 secs.
BUILD SUCCESSFUL in 1s
26 actionable tasks: 1 executed, 25 up-to-date
最佳答案
解决方案1 (这不是我的答案,这归功于user和user)
原因是我在“运行/调试配置”对话框中定义了一个新配置,并将完整路径放置到Gradle项目中的build.gradle文件:字段中,如下所示。 (我通过单击字段右侧的省略号(...)来完成此操作,但我也可以直接输入。)
但是,我应该做的是按照现有配置中的模式进行操作,在该配置中,通过单击字段右侧的“文件夹”图标将Gradle项目指定为“注册项目”,在下图中以绿色突出显示。在这种情况下,该字段的内容仅是项目名称,并且显示的背景/前景颜色略有不同。 (我意外地发现,右键单击该名称会将其替换为包含build.gradle的文件夹的路径,但是如果您取消并再次开始编辑配置,它仍将仅显示为项目名称。)
之后,在gradle.properties
中插入以下行(所有功劳都归功于此user):
org.gradle.jvmargs=-Xmx1536m
org.gradle.java.home=${path to java sdk}
java sdk
的路径
$ whereis java
java: /usr/bin/java /etc/java /usr/share/java
$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2009-01-15 18:34 /usr/bin/java ->
/etc/alternatives/java
$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 31 2009-01-15 18:34 /etc/alternatives/java ->
/usr/local/jre1.6.0_07/bin/java
/usr/lib/jvm/java-1.7.0-openjdk-amd64
中,而我只是用
${path to java sdk}
替换了
/usr/lib/jvm/java-1.7.0-openjdk-amd64
,就是这样,我很高兴。
关于android - 错误:gradle构建后已经完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48944347/
在 spring-security项目,在 build.gradle文件,以下插件可用: apply plugin: 'io.spring.nohttp' apply plugin: 'locks'
我正在尝试使用gradle任务作为“与操作系统无关的shell脚本”。我在编写构建文件的逻辑时没有问题,但是我希望能够从任何文件夹中运行它。 我的第一次尝试是在路径上放置一个带有build.gradl
我在同一目录下有三个具有不同名称的build.gradle dev.build.gradle uat.build.gradle prd.build.gradle 我有4期 “gradle build”
乡亲们 有谁知道如何使用gradle与自定义的build.gradle和settings.gradle一起运行-即两者在一起? 我认为我可以有一个自定义的build.gradle文件(-b标志)-但这
Gradle 配置有两个属性,称为 dependencies和 incoming .根据我的理解,我们可以通过 Gradle 依赖 block 向配置添加依赖,如下所示: dependencies {
我正在测试将我的工件推送到 Nexus Maven 存储库。我正在使用 gradle这样做。 gradle upload有什么区别和 gradle publish ? 最佳答案 目前gradle提供了
这里有一个类似的问题:Gradle properties not being read from ~/.gradle/gradle.properties,但它不能解决我的问题。 在我看来,gradle
如何检索 Gradle 本身的版本 以编程方式从 Gradle 插件中? 最佳答案 刚刚发现可以使用任何一种方法来解决它 getProject().getGradle().getGradleVersi
2 个 gradle 项目,A 和 B,其中 A 定义了对 B 的编译依赖。为 maven 和 gradle 项目启用了 JAR 的重新映射。我试过启用和禁用自定义工具模型。我在 init.d 目录下
如何从 gradle 运行另一个 gradle 脚本。我有多个 gradle 脚本可以在 /test 下运行测试目录。 /build.gradle使用要运行的测试 gradle 文件的名称调用。例如
我已经看到了多模块项目的不同布局,其中有些项目只有一个 build.gradle。而其他项目将有 build.gradle在根和 build.gradle在每个子项目中。我想知道有什么区别以及首选哪种
我对 Gradle 生命周期有一个基本的询问。我的项目是一个多模块项目。 我注意到以下命令: ./gradlew clean bignibou-server:run 不等于运行以下两个命令按顺序运行:
我有一个项目,其中包含一个子项目,如下所示: Root Project |----gradle.build |----SubProject |----|----gradle.build 这里的子项目包
我有 gradle 项目,我想向不使用 gradle 或 maven 等构建工具的项目添加依赖项。 目录结构如下: commonfolder\ gradleProject\ b
我想创建一个类来帮助我加载不同类型的属性(local.properties,gradle.properties,$GRADLE_HOME/gradle.properties,环境变量,系统属性和自定义
我有一个多模块项目,其目录结构如下: proj |-modA |-modB |-modMain \-modSysTest 依赖项是: modB -> modA modMain -> modB modM
我正在尝试创建一个可以在 --offline 模式下工作的 gradle 项目的副本。除了一个步骤,我已经自动化了所有步骤。我无法自动将插件 jar 下载到 gradle 缓存中。 我的离线分发通过指
基本上我想这样做: Use Gradle function from other gradle file 也就是说,从另一个 gradle 脚本中调用一个函数。问题是我的 build.gradle 在
我有一个简单的 gradle 插件,我想试用一下,但我不确定如何“请求”gradle 运行我的测试 这是我要修改的 block (在我的 gradle 构建文件的顶部) buildscript {
在 Android Studio 中创建项目时,我收到以下错误消息。 Failed to import new Gradle project: Could not install Gradle dis
我是一名优秀的程序员,十分优秀!