Skip to main content

Android-Studio : Error: Could not create the Java Virtual Machine

Solution:
  • Changed below file to modify vm heap option.
  • C:\Program Files\Android\android-studio\bin\studio.exe.vmoptions
    & increased -Xms128m to -Xms512m and restarted Android Studio.
  • You should create a new environment variable named _JAVA_OPTIONS, set it to -Xms256m -Xmx1024m and it should work.
  • Follow this steps:
    1. Run regedit
    2. Go to HKEY_CURRENT_USER
    3. Select Environment
    4. Add a new String Value and enter _JAVA_OPTIONS for Value name
    5. Enter -Xms256m -Xmx512m for Value data
    6. Reboot computer

Comments

Post a Comment

Popular posts from this blog

Error: Retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

My project is going on easily but suddenly what I found below bugs when developing an app. I know it's minor bug but it may be useful to anyone. Here is the error: Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. Solution: This happens because after updates your android studio uses API 23 by default. 1) First check that your compile SDK version must match the support library's major version. If you are using version 23 of the support library, you need to compile against version 23 of the Android SDK. Alternatively you can continue compiling against version 22 of the Android SDK by switching to the latest support library v22.   2) Go to your project structure -> Properties -> and change Build tool version to...

Be aware while Posting photo from a native ShareDialog in Facebook android SDK

Add the content provider to your manifest. <provider  android:name="com.facebook.NativeAppCallContentProvider" android:authorities="com.facebook.app.NativeAppCallContentProvider{Facebook-App-Id}" android:exported="true" /> Make sure exported=true (as above) Example: <provider android:name="com.facebook.NativeAppCallContentProvider" android:authorities="com.facebook.app.NativeAppCallContentProvider123456" android:exported="true" />

Youtube API: Service Intent must be explicit

Whe n I am using Youtube API and open the video in my application then it shows me below error in Android L Problem java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.youtube.api.service.START } Solution: *  The new android youtube SDK as been released! No more implicit intent problem: https://developers.google.com/youtube/android/player/downloads/