You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
adb: failed to stat app/build/outputs/apk/app-debug.apk: No such file or directory #124
**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.
CC: @sidferreira@ferrannp - do you have an idea why this could be happening (two folders inside apk?) There's some decent conversation happening in React Native repository too.
@grabbou AFAIK this is actually a gradle/android thing. In the past, I wanted to rename the generated files and it was a lot of work because it was forcing the folder even with me renaming the apk file.
@matart15 have you tried to rename the generated APK by any chance?
------------------------------------------------------------
Gradle 4.7
------------------------------------------------------------
Build time: 2018-04-18 09:09:12 UTC
Revision: b9a962bf70638332300e7f810689cb2febbd4a6c
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_111 (Oracle Corporation 25.111-b14)
OS: Mac OS X 10.14.1 x86_64
When its time for the INT flavour to generate, I get this:
######################## Int Android Build Successful! ########################
============================= Copying APK to Dist =============================
{ [Error: ENOENT: no such file or directory, stat '/Users/danale/Projects/NFIBEngage/android/app/build/outputs/apk/in/release/app-in-release.apk']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path:
'/Users/danale/Projects/NFIBEngage/android/app/build/outputs/apk/in/release/app-in-release.apk' }
instead of ENGAL-IN.apk in the dist/ directory where the others are placed. I thought it was a naming convention, but I have tweaked the naming and I continue to get this output.
I have a few build variants configured, for both environment, platform, and debuggable (e.g. localGoogleDebug). Including deviceId in the CLI command arguments results in the following error:
BUILD SUCCESSFUL in 2m 48s
1042 actionable tasks: 25 executed, 1017 up-to-date
info Connecting to the development server...
error Failed to install the app on the device. Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
While no explicit error is actually logged from the CLI, from my own debugging it would appear that my build APK is not found.
Actual APK:app/build/outputs/apk/localGoogleDebug/debug/app-local-google-debug.apk CLI Search:app/build/outputs/apk/localgoogledebug/app-localgoogledebug.apk
The workaround from #124 does not appear to address my issue.
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
Activity
grabbou commentedon Mar 11, 2019
CC: @sidferreira @ferrannp - do you have an idea why this could be happening (two folders inside
apk?) There's some decent conversation happening in React Native repository too.sidferreira commentedon Mar 11, 2019
@grabbou AFAIK this is actually a gradle/android thing. In the past, I wanted to rename the generated files and it was a lot of work because it was forcing the folder even with me renaming the apk file.
@matart15 have you tried to rename the generated APK by any chance?
sidferreira commentedon Mar 11, 2019
@matart15 What's your gradle version?
matart15 commentedon Mar 12, 2019
matart15 commentedon Mar 12, 2019
for now I am using workaround
grabbou commentedon Mar 12, 2019
I wonder if it's possible to somehow dynamically get this
apkfile just like we did with flavours recently.sidferreira commentedon Mar 12, 2019
@grabbou can't we look for the newest generated APK in the folder?
grabbou commentedon Mar 12, 2019
thymikee commentedon Jul 7, 2019
Is this still an issue?
ldco2016 commentedon Sep 26, 2019
This may be a relevant issue for me as well. I have a script that generates apks and it generates all the flavours correctly except for INT:
When its time for the INT flavour to generate, I get this:
instead of
ENGAL-IN.apkin thedist/directory where the others are placed. I thought it was a naming convention, but I have tweaked the naming and I continue to get this output.dcalhoun commentedon Apr 8, 2020
I wanted to share that this does appear still be an issue, at least for me. The failure only occurs when passing
deviceId.Succeeds:
yarn react-native run-android --variant=localGoogleDebugFails:
yarn react-native run-android --variant=localGoogleDebug --deviceId=<target-device-id>I have a few build variants configured, for both environment, platform, and debuggable (e.g.
localGoogleDebug). IncludingdeviceIdin the CLI command arguments results in the following error:While no explicit error is actually logged from the CLI, from my own debugging it would appear that my build APK is not found.
Actual APK:
app/build/outputs/apk/localGoogleDebug/debug/app-local-google-debug.apkCLI Search:
app/build/outputs/apk/localgoogledebug/app-localgoogledebug.apkThe workaround from #124 does not appear to address my issue.
Environment
github-actions commentedon Dec 1, 2022
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.