0

I'm trying to run my react native app v0.53 after create new app and I get the error

Total time: 21.148 secs
Could not build the app, read the error above for details.

Running C:\Users\XXXX\AppData\Local\Android\sdk/platform-tools/adb -s 29d84044 reverse tcp:8081 tcp:8081
Installing the app on the device (cd android && adb -s 29d84044 install app/build/outputs/apk/app-debug.apk
adb: failed to stat app/build/outputs/apk/app-debug.apk: No such file or directory
Command failed: C:\Users\XXXX\AppData\Local\Android\sdk/platform-tools/adb -s 29d84044 install app/build/outputs/apk/app-debug.apk
Could not install the app on the device, read the error above for details.

Starting the app on 29d84044 (C:\Users\XXXX\AppData\Local\Android\sdk/platform-tools/adb -s 29d84044 shell am start -n com.sleepcalculator/com.sleepcalculator.MainActivity)...
Starting: Intent { cmp=com.sleepcalculator/.MainActivity }
Error type 3
Error: Activity class {com.sleepcalculator/com.sleepcalculator.MainActivity} does not exist.

error

     What went wrong:
Execution failed for task ':app:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

what I already tried to do: remove npm cache, npm install, remove android cache

4
  • Can you add the "error above" that is being referenced? Commented Feb 12, 2018 at 18:51
  • Yes, I edited my post Commented Feb 12, 2018 at 18:53
  • Can you post the full log? You're missing the errors from AAPT. Commented Feb 15, 2018 at 18:07
  • Your application is not getting compiled. That is the error. Commented Feb 16, 2018 at 16:36

1 Answer 1

2
+50

You might have already installed app with the same package name, so make sure you delete it first from your phone/emulator. Once you do that, try to run the app again.

If that didn't help check this thread: https://github.com/facebook/react-native/issues/14952

Sign up to request clarification or add additional context in comments.

1 Comment

it was the solution for me issue, in addition I run "react-native upgrade" in the project

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.