Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INSTALL_FAILED_INSUFFICIENT_STORAGE Execution failed for task ':app:installDebug'. React-native app on Android Emulator #22202

Closed
PurnimaNaik opened this issue Nov 7, 2018 · 6 comments
Labels
Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@PurnimaNaik
Copy link

I am getting the following error when trying to run react-native run-android hooked to Pixel 2 XL (API 26) Emulator

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_INSUFFICIENT_STORAGE

Package.json

{
  "name": "ReactNativeApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.6.0-alpha.8af6728",
    "react-native": "^0.57.4",
    "react-native-animatable": "^1.3.0",
    "react-native-catch-first-time": "0.0.1",
    "react-native-device-info": "^0.24.3",
    "react-native-keyboard-aware-scroll-view": "^0.7.4",
    "react-native-maps": "^0.22.0",
    "react-native-push-notification": "^3.1.1",
    "react-native-splash-screen": "^3.1.1",
    "react-navigation": "^2.18.1"
  },
  "devDependencies": {
    "babel-jest": "23.6.0",
    "jest": "23.6.0",
    "metro-react-native-babel-preset": "0.45.3",
    "react-test-renderer": "16.6.0-alpha.8af6728",
    "schedule": "^0.4.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

Project level Build.gradle

buildscript {
    ext {
        buildToolsVersion = "27.0.3"
        minSdkVersion = 16
        compileSdkVersion = 27
        targetSdkVersion = 26
        supportLibVersion = "27.1.1"
    }
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:3.2.1'
    }
}

allprojects {
    repositories {
        google()
        mavenLocal()
        maven { url 'https://maven.google.com' }
        jcenter()
        maven { url "$rootDir/../node_modules/react-native/android" }
        }
     }

    task wrapper(type: Wrapper) {
    gradleVersion = '4.4'
    distributionUrl = distributionUrl.replace("bin", "all")
}

App level Build.gradle

apply plugin: "com.android.application"

import com.android.build.OutputFile

project.ext.react = [
    entryFile: "index.js"
]

apply from: "../../node_modules/react-native/react.gradle"

def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "com.reactnativeapp"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    compile project(':react-native-device-info')
    compile project(':react-native-push-notification')
    compile project(':react-native-maps')
    compile project(':react-native-splash-screen')
}

task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

Any help is appreciated!

@react-native-bot react-native-bot added the Platform: Android Android applications. label Nov 7, 2018
@react-native-bot
Copy link
Collaborator

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

Please make use of the bug report template to let us know about a reproducible bug or regression in the core React Native library.

If you'd like to propose a change or discuss a feature request, there is a repository dedicated to Discussions and Proposals you may use for this purpose.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. 📋No Template labels Nov 7, 2018
@alsemany
Copy link

INSTALL_FAILED_INSUFFICIENT_STORAGE
I got this error also
I thought this issue because there's no space remaining and this was right
I just resolved this by uninstalling some applications from the emulator to add free space

@vivimargaretha
Copy link

You try to make new Virtual Device in Android Studio, then you must change RAM and internal Storage for more than default. That's work for me

@shahmir811
Copy link

Un-install old apps so that you can get some free space on emulator.
Then run react-native run-android it will work perfectly.

@lupelius
Copy link

lupelius commented Aug 6, 2019

emulator -avd "Name" -partition-size 500

To increase your partition size, see:

https://stackoverflow.com/questions/26593711/android-5-0-emulator-showing-storage-space-running-out

@lijingsonglijingsong
Copy link

do it

@facebook facebook locked as resolved and limited conversation to collaborators Nov 7, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Nov 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants