1. 程式人生 > >Invalid maximum heap size: -Xmx4g錯誤解決

Invalid maximum heap size: -Xmx4g錯誤解決

今天導了個專案編譯可以,但是build APK的時候報如下錯誤,然後百度了好多

Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the build process.

Error:Error: Could not create the Java Virtual Machine.
Error:Error: A fatal exception has occurred. Program will exit.
Error:Invalid maximum heap size: -Xmx4g
Error:The specified size exceeds the maximum representable size.
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException

原來是build.gradle檔案裡

dexOptions {
    /*incremental false*/
preDexLibraries = false
javaMaxHeapSize "4g"
}
刪除或者把4g改為1024m,解決問題,改完以後一定要先同步再編譯執行...

相關推薦

Invalid maximum heap size: -Xmx4g錯誤解決

今天導了個專案編譯可以,但是build APK的時候報如下錯誤,然後百度了好多 Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the b

azkaban-2.5.0 啟動報錯Invalid maximum heap size: -Xmx4G 解決

啟動azkaban後報錯資訊為: Invalid maximum heap size: -Xmx4096m The specified size exceeds the maximum representable size. Could not create the Ja

azkaban執行時出現Invalid maximum heap size: -Xmx4G The specified size exceeds the maximum representable s

JDK環境:jdk1.7.0_71azkaban版本2.5將執行包,web包都解壓完成後,配置完成,且mysql已經建表在執行bin/azkaban-web-start.sh時出錯:Invalid maximum heap size: -Xmx4GThe specified

Android Studio提示Error:Invalid maximum heap size: -Xmx4g

# # *DO NOT* modify this file directly. If there is a value that you would like to override, # please add it to your user specific configuration file. # #

invalid maximum heap size:-xmx4g異常

最近匯入一個專案發現報一下的錯誤:could not create the java virtual machineA fatal exception has occurred.Program willexitinvalid maximum heap size:-xmx4gt

Android Invalid maximum heap size: -Xmx 解決方法

最近遇到一個bug,由於專案較大,超過了65535限制,因此要使用multiDexEnabled,build.gradle檔案如下: dexOptions { javaMaxHea

hive啟動時報錯Invalid maximum heap size: -Xmx4096m

版本說明:hadoop0.20.0  hive0.6.0 問題描述:輸入hive啟動時報錯 ---------------------------------------------------------------------------------------- - 

invalid LOC header (bad signature) 錯誤解決辦法

錯誤情況 maven工程時,一直提示junit錯誤,仔細檢視,發現有junit包,但是仍然沒起作用,pom.xml加上了版本資訊,還是不行,感覺為包錯誤,瀏覽包類,開啟提示 “invalid LOC header (bad signature)”,感覺下載的junit包出問題。 解決

SoapUI啟動報錯:The JVM could not be started. The maximum heap size (-Xmx) might be too large

SoapUI啟動的時候,報如題錯誤,經過排查,在安裝目錄\bin\下,找到SoapUI的vmoptions引數配置檔案 打開發現-Xmx引數配置,將預設值改小一些即可: -Xms128m -Xmx80

新版IntelliJ IDEA中Mybatis報Invalid bound statement (not found)錯誤解決辦法

由於新版的IntelliJ IDEA不再編譯source folder下的xml檔案,而我們平時使用mybatis時,習慣於將*Mapper.xml檔案放在與dao層、service層平級的src目錄下。這就導致ItelliJ IDEA不會變異這些xml資料夾,從而導致In

關於jvm記憶體分配的問題heap size [268435456] not equal to maximum heap size [2147483648],需要修改的jvm配置

*此操作需要root許可權 [[email protected] ~]# sysctl -w vm.max_map_count=262144 1 檢視修改結果 [[email protected] ~]# sysctl -a|grep vm.max_ma

The size of the object heap + VM data exceeds the maximum representable size問題解決辦法

不懂上面英文含義自行百度,簡單一句話來說,就是你想執行jvm,他得不到足夠的記憶體; 分析一下原因: 很能可能是fork時候啟動的jvm需要的記憶體過大,比如您電腦可用記憶體只有1G,但是你卻要配置2G,這樣子顯然不可取。 根據提示,檢查一下您配置檔案,是否有設定過大的情況

微信開發配置JSSDK,註入權限驗證,以及invalid signature簽名錯誤解決

工具 沒有 ans dem menus true 發現 bin ces 在微信開發中很多功能都要用到微信JSSDK,關於JSSDK的使用,微信官方的文檔已經比較詳細,一定要仔細去看文檔。 <script src="https://res.wx.qq.com/open

ruby環境sass編譯中文出現Syntax error: Invalid GBK character錯誤解決方法

方法 添加 ali 編譯 sass編譯 body har class *** 這種錯誤是因為在scss文件中使用了中文註釋,導致轉css時出錯。 解決辦法: 找到ruby安裝路徑下的engine.rb文件,(我的在這裏 E:\Ruby22-x64\lib\ruby\gems

gatling壓力測試工具啟動gatling.bat命令行窗口報Error occurred during initialization of VM Could not reserve enough space for 1048576KB object heap錯誤解決方法

大於 spa ava color default class -xms 查看系統 測試 原因是:Java虛擬機(JVM)分配的內存大於系統可用內存數,所以沒有足夠的空間分配給JVM來創建Object 解決方法:編輯gatling.bat文件,查看系統剩余內存大小,修改分配的

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)錯誤幾種解決方案

報錯資訊: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.study.server.mapper.UserMapper.insert at org.apache.ibat

錯誤的異常資訊為Index column size too large. The maximum column size is 767 bytes

使用mysql建表的時候報索引太大,錯誤異常資訊為Index column size too large. The maximum column size is 767 bytes。 首先我先將mysql的配置檔案更改了一下設定為 default-storage

pyinstaller打包python檔案出現"RuntimeError: maximum recursion depth exceeded in comparison "錯誤解決方案

一、出現原因: python預設迭代次數有限(大概是1000左右),如果你引用了plot畫圖,或者某個迴圈方法超出此限制,就會報這個錯誤 二、解決方法: 打包失敗,也會生成一個spec檔案,如你的主python檔案叫做main.py,則修改main.spec: 新增程式碼行:impo

openstack-HTTP exception thrown: Maximum number of ports exceeded錯誤解決方案

最近幾天什麼都沒動無法建立雲主機了,經過一番查詢 1.查日誌 /data/jumpserver/logs 得到錯誤 HTTP exception thrown: Maximum number of ports exceeded 2.百度查了下,說是ip滿了 於是修改/etc/neutron/n

Invalid default value for 'UPDATE_TIME' " 錯誤提示的解決辦法

問題: 由於 tmp_wrh_1 的欄位UPDATE_TIME 的欄位型別是 timestamp ,預設值是:'0000-00-00 00:00:00' 即:`UPDATE_TIME` timestamp NOT NULL DEFAULT '0000-00-00 00:0