question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

adb: failed to stat app/build/outputs/apk/app-debug.apk: No such file or directory

See original GitHub issue

How i started my project

react-native init demo && cd demo

react-native run-android --deviceId ZY2243ZMVC

This caused an error:failed to find the app-debug.apk

But after Manual installation, it was successful

adb install app-debug.apk

from android/app/build/output/debug/app-debug.apk

Environment

“react”: “^16.0.0”, “react-native”: “0.51.1”, Andriod Sdk: 26.0.2

Expected Behaviour

–Should have installed the apk without any issue –Having Problem with all android devices

Actual Behaviour

**BUILD SUCCESSFUL in 2m 18s**
164 actionable tasks: 3 executed, 161 up-to-date
Running /home/rivertech/Android/Sdk/platform-tools/adb -s ZY2243ZMVC reverse tcp:8081 tcp:8081
adb server version (36) doesn't match this client (39); killing...
* daemon started successfully
Installing the app on the device (cd android && adb -s ZY2243ZMVC 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: /home/rivertech/Android/Sdk/platform-tools/adb -s ZY2243ZMVC 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 ZY2243ZMVC (/home/rivertech/Android/Sdk/platform-tools/adb -s ZY2243ZMVC shell am start -n com.demo/com.demo.MainActivity)...
Starting: Intent { cmp=com.demo/.MainActivity }
Error type 3
Error: Activity class {com.demo/com.demo.MainActivity} does not exist.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

28reactions
datvp09commented, Oct 5, 2018

I found that running with --deviceId parameter cause this problem, when I run only react-native run-android there’s no problem. Try this: adb -s [deviceId] install android/app/build/outputs/apk/app-debug.apk

4reactions
dirkpostmacommented, Aug 23, 2018

I reopen this thick as I guess this is a bug: currently, when building release variant and specifying the deviceId, the debug-apk filename is tried to be installed on the device. This is wrong. In stead, the filename for the release apk should be used.

cd android && adb -s {{THE_GIVEN_DEVICE_ID}} install app/build/outputs/apk/app-debug.apk

Should be:

cd android && adb -s {{THE_GIVEN_DEVICE_ID}} install app/build/outputs/apk/release/app-release.apk
Read more comments on GitHub >

github_iconTop Results From Across the Web

adb: failed to stat app/build/outputs/apk/app-debug.apk: No ...
From the root of your directory App run: > adb devices. List of devices attached 988se6666555453 device. copy your deviceId if your device ......
Read more >
[Solved]-adb: failed to stat app/build/outputs/apk/app-debug.apk
Coding example for the question adb: failed to stat app/build/outputs/apk/app-debug.apk: No such file or directory-React Native.
Read more >
ADB No such file or directory - Windows - Linus Tech Tips
Hello. So i have an android phone and i want to rewrite/change it's ROM. So i tried using "ADB" but everytime i would...
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix this issue, upgrade your Android 11 emulator to version 9 or higher by navigating to Tools > SDK Manager. In the...
Read more >
QT Creator does not connect to Android app being debugged
As I can see from QT Creator output, some pull command failed: ... -Debug/android-build//build/outputs/apk/debug/android-build-debug.apk" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found