Android studio与windows系统兼容问题

来源:互联网 发布:怎么用国外网络 编辑:程序博客网 时间:2024/06/05 19:32

故事的铺垫:前段时间,常用的电脑进厂了,从家里随便找了台电脑出来,配置环境后,跑其他的项目都没遇到什么问题,直到拿到之前的一个比较多依赖包的项目......


故事的开展:从svn上讲项目拿下来后,gradle开始build...... 然后......还没有什么事(哈哈),插上手机,开始running app,等呀等呀,然后......特么就报错了难过


废话不多说了,直接上问题



Error:Error: Could not create the Java Virtual Machine.Error:Error: A fatal exception has occurred. Program will exit.Error:Invalid maximum heap size: -Xmx4gError:The specified size exceeds the maximum representable size.Error:Error: Could not create the Java Virtual Machine.Error:Error: A fatal exception has occurred. Program will exit.Error:Invalid maximum heap size: -Xmx4gError:The specified size exceeds the maximum representable size.Error:Error: Could not create the Java Virtual Machine.Error:Error: A fatal exception has occurred. Program will exit.Error:Invalid maximum heap size: -Xmx4gError:The specified size exceeds the maximum representable size.Error:Error: Could not create the Java Virtual Machine.Error:Error: A fatal exception has occurred. Program will exit.Error:Invalid maximum heap size: -Xmx4gError:The specified size exceeds the maximum representable size.Error:Execution failed for task ':app:transformClassesWithDexForDebug'.> com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --force-jumbo --num-threads=4 --multi-dex --output E:\as_workplace\Hello\app\build\intermediates\transforms\dex\debug\folders\1000\2\libammsdk_ed5cd63796688fdf7bc7a68f4787cddb6597a691 E:\as_workplace\Hello\app\libs\libammsdk.jar}

一开始看到这一句信息“Error:Execution failed for task ':app:transformClassesWithDexForDebug'.”,然后就看是了我的纠结之旅,把所有的包都过了一遍,只有v4包可能存在包冲突,行,咱百度一下吧,各种gradle配置博文中说到的方法全试过了,clean与rebulde等方法都不好用,没效果。


时间过去了两天,还是没找出问题的所在......mmp


今天,我刚好要从旧硬盘上拷资料,旧硬盘上是原来的工作环境,突发奇想地想要试一试,换硬盘启动切换完开发环境,然后当然就是跑项目了,特么同样的代码,跑...跑起来了呀,我这两天到底干了什么?我是谁?我在哪里?抓狂


对比一下这两个工作环境有什么不同,发现现在这台电脑是x64处理器,也就是64位的机子,但是装的竟然是32位的win10的操作系统。已经无力吐槽了......


因为装的是32位的系统,自然用的也是32位开发环境。事情到这里就算告一段落了,不再像前两天那样摸不着头脑了。


将问题锁定为处理器或系统的兼容问题。



原创粉丝点击