我在这个项目上工作了一个多星期。一切似乎都很完美。但是在过去的三天里,我并不确切地知道出了什么问题。 这是我的gradle控制台。
Executing tasks: [:app:assembleDebug]
Configuration on demand is an incubating feature.
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72103Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:preDexDebug
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Error: Could not create the Java Virtual Machine.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Error: A fatal exception has occurred. Program will exit.
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Users\Ameni\android-sdks\sdk\build-tools\21.1.2\dx.bat --dex --output D:\Ameni\Android\MoveMore\app\build\intermediates\pre-dexed\debug\jfuzzylogic_2.0.9-4b966e0bdd93414a6ab36ffebfbec8ef2e15deb6.jar D:\Ameni\Android\MoveMore\app\src\main\res\raw\jfuzzylogic_2.0.9.jar
Error Code:
1
Output:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 27.674 secs
然后在跑步中......
Waiting for device.
Target device: genymotion-custom_phone___4_4_4___api_19___768x1280-192.168.110.101:5555
Uploading file
local path: D:\Ameni\Android\MoveMore\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.more.move.movemore
Local path doesn't exist.
我检查了apk文件......我没找到它们......
请帮我找到问题...
答案 0 :(得分:0)
我发现了问题:这是由于java的最新更新...显然gradle不适用于这个特定版本的java ..所以我卸载java 8,重新安装java 7 ...清理项目,然后重建项目..无效缓存/重新启动..一切似乎都工作正常。
答案 1 :(得分:0)
我有这个确切的问题,不能相信这还没有得到回答,它是如此令人沮丧。 Android Studios是一场噩梦!
修改
这是一个YouTube视频link解决方案,请注意,他使用了一些丰富多彩的语言。我实际上没有关注视频,但它看起来像是同一个问题。我没有观看视频,因为出于某些奇怪的原因,这个错误修复了哈哈,有趣和游戏啊!