KoS
KoS

Reputation: 89

android.permission.ASEC_CREATE error when trying to run react app

I try to run "react-native android" but got the following errors

Execution failed for task ':app:installDebug'. com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to finalize session : Unknown failure (Error: java.lang.SecurityException: Requires android.permission.ASEC_CREATE permission)

I have no problem running on emulator, but if i try to run on my phone, the error occurs

I try google but have zero results. Any ideas?

Upvotes: 0

Views: 450

Answers (3)

Ritesh
Ritesh

Reputation: 1

My problem solved after change preferred install Location sdcard to phone Storage in mobile setting. hope this help you

Upvotes: 0

Arjun Vyas
Arjun Vyas

Reputation: 27

As of I face this issue, had searched a lot for the solution.

Later on came to know maybe this issue occurs due to multiDexEnabled true in your

app/build.gradle in defaultConfig{}

after Successful Sync of Project what you have to do is :

  • list out your devices >> adb devices
  • You can see your listed deviceId like 1234553231221
  • run your project >> react-native run-android --deviceId your_device_id

Upvotes: 1

Sathish Sundharam
Sathish Sundharam

Reputation: 1130

This problem appeared to me when I upgraded Android Studio and then Gradle.

To solve the problem I returned the version of Gradle:

Buildscript {
     Repositories {
         Jcenter ()
     }
     Dependencies {
          classpath 'com.android.tools.build:gradle:2.x.x'
          ...
     }
}

Upvotes: 1

Related Questions