2015-06-10 8 views
9

संस्करण 1.3 से शुरू हो रहा है, एंड्रॉइड स्टूडियो अब आईडीई-विशिष्ट ग्रैडल जेवीएम तर्क सेटिंग्स का समर्थन नहीं करेगा। Gradle JVM सेटिंग्स को gradle.properties फ़ाइलों में सेट करने की आवश्यकता है। निर्माण निष्पादन को बनाए रखने के लिए यह परिवर्तन आवश्यक है, भले ही निर्माण निष्पादित किया गया हो (आईडीई, कमांड लाइन या सीआई सर्वर।) यदि आपकी प्रोजेक्ट आईडीई-विशिष्ट ग्रैडल जेवीएम तर्कों का उपयोग कर रही है, तो एंड्रॉइड स्टूडियो प्रोजेक्ट सिंक पर आपकी मदद करेगा उन सेटिंग्स को अपनी प्रोजेक्ट की gradle.properties फ़ाइल में कॉपी करें। "ग्रैडल" सेटिंग पृष्ठ में "ग्रैडल वीएम विकल्प" टेक्स्ट फ़ील्ड भी हटा दिया गया है।एंड्रॉइड स्टूडियो में ग्रैडल जेवीएम सेटिंग्स कैसे सेट करें 1.3

मैं हो रही है त्रुटि:

Error:Unable to start the daemon process. 
This problem might be caused by incorrect configuration of the daemon. 
For example, an unrecognized jvm option is used. 
Please refer to the user guide chapter on the daemon at  http://gradle.org/docs/2.4/userguide/gradle_daemon.html 
Please read the following process output to find out more: 
----------------------- 
Error occurred during initialization of VM 
Could not reserve enough space for object heap 
Error: Could not create the Java Virtual Machine. 
Error: A fatal exception has occurred. Program will exit. 

मेरे gradle.properties फ़ाइलों

org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 

org.gradle.parallel=true 

उत्तर

1

निम्नलिखित

org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 

या कुछ छोटे करने के लिए अपने jvmargs बदलने का प्रयास करें -Xmx512m क्योंकि आपके सिस्टम में बनाने के लिए पर्याप्त स्मृति नहीं है ऑब्जेक्ट ढेर और इस प्रकार जेवीएम।

आप निम्न विकल्प भी जोड़ सकते हैं:

org.gradle.daemon=true 

macosx पर उन लोगों के लिए मैं जोड़ने के लिए निम्नलिखित

-Djava.awt.headless=true 
0

build.gradle में अपने Android खंड को यह जोड़े की तरह:

compileOptions { 
    sourceCompatibility JavaVersion.VERSION_1_7 
    targetCompatibility JavaVersion.VERSION_1_7 
} 
संबंधित मुद्दे