0

Help me please. I get these prolems in my project:

Error:Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded

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

Android Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="phonelocation.trouverphone.asuss550c.phonelocation" >

    <uses-permission android:name="phonelocation.example.asuss550c.phonelocation.permission.MAPS_RECEIVE" />

    <permission
        android:name="phonelocation.trouverphone.asuss550c.phonelocation.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />


    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.READ_SMS" />
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />-->
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <!--<uses-permission android:name="android.permission.READ_PHONE_STATE" />-->
   <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.VIBRATE" />

   <uses-feature
       android:glEsVersion="0x00020000"
       android:required="true" />


   <application

       android:allowBackup="true"
       android:icon="@drawable/cover"
       android:label="@string/app_name"
       android:theme="@style/AppTheme" >
       <meta-data
           android:name="com.google.android.gms.version"
           android:value="@integer/google_play_services_version" />
       <meta-data
           android:name="com.google.android.maps.v2.API_KEY"
           android:value="MAP_API_CODE" />

       <activity
           android:name="phonelocation.trouverphone.asuss550c.phonelocation.MainActivity"
           android:excludeFromRecents="true"
           android:label="@string/app_name"
           android:screenOrientation="portrait" >
           <intent-filter>
               <action android:name="android.intent.action.MAIN" />

               <category android:name="android.intent.category.LAUNCHER" />
           </intent-filter>
       </activity>

       <receiver android:name="phonelocation.trouverphone.asuss550c.phonelocation.IncomingSms"
           android:permission="android.permission.BROADCAST_SMS"
           tools:ignore="UnprotectedSMSBroadcastReceiver">
           <intent-filter android:priority="2147483647">
               <action android:name="android.provider.Telephony.SMS_RECEIVED" />
               <action android:name="android.intent.action.BOOT_COMPLETED" />
               <category android:name="android.intent.category.DEFAULT" />
           </intent-filter>
       </receiver>

       <activity
           android:name="phonelocation.trouverphone.asuss550c.phonelocation.SubSetting"
           android:excludeFromRecents="true"
           android:label=" " >
       </activity>
       <activity
           android:name="phonelocation.trouverphone.asuss550c.phonelocation.MapDisplay"
           android:excludeFromRecents="true"
           android:label="@string/title_activity_map_display" >
       </activity>
       <activity
           android:name="phonelocation.trouverphone.asuss550c.phonelocation.VisitLocations"
           android:label=" " >
       </activity>
       <activity
           android:name="phonelocation.trouverphone.asuss550c.phonelocation.FindMyphone"
           android:label="@string/ListIFind" >
       </activity>
       <activity
           android:name="phonelocation.trouverphone.asuss550c.phonelocation.ContactList"
           android:label="@string/title_activity_find_myphone" >
       </activity>
       <activity
           android:name="phonelocation.trouverphone.asuss550c.phonelocation.PhoneVerify"
           android:label="@string/title_activity_phone_verify" >
       </activity>
       <activity
           android:name="com.google.android.gms.ads.AdActivity"
           android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
           android:theme="@android:style/Theme.Translucent" />
   </application>

</manifest>

Build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        multiDexEnabled true
        applicationId "phonelocation.trouverphone.asuss550c.phonelocationphone"
        minSdkVersion 12
        targetSdkVersion 23
        versionCode 26
        versionName "1.0.4"


    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.android.support:support-v4:23.1.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.google.android.gms:play-services:9.2.0'
    // compile 'com.google.android.gms:play-services:9.0.2'
    //compile 'com.google.firebase:firebase-core:9.2.0'
    //compile 'com.google.firebase:firebase-ads:9.2.0'
  //  compile 'com.google.firebase:firebase-crash:9.0.2'
}
  //apply plugin: 'com.google.gms.google-services'
Esprit
  • 41
  • 2
  • 6

1 Answers1

0

The gradle daemon simply does not have enough memory to complete your build, causing it to get stuck perpetually garbage-collecting until it gives up.

See To run dex in process, the Gradle daemon needs a larger heap. It currently has approximately 910 MB for information about how to increase the allocated memory.

Community
  • 1
  • 1
Kiskae
  • 24,655
  • 2
  • 77
  • 74
  • If there's already an answer post a comment or mark the question as duplicate. Do not post answers just linking to another page. Thank you. – Eugen Pechanec Dec 06 '16 at 19:19