Black screen in android emulator

1

I'm trying to start the emulator by android studio and genymotion but in the two it gets a black screen in the emulator:

It may be my graphics card that sucks, but would it have some way to fix it? Or some other decent emulator for android development?
I also tried to test my apps on a physical device, first I tested it with my mobile phone and it worked, then I tried it with a cell phone I bought for it (j5 metal)

C:\Users\MIDIASILK\Desktop\Junior\Android\curso-react-native\exercicios>react-n
tive run-android --deviceId 8031fe9d
Starting JS server...
Building the app...

> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
bundle: Writing bundle output to: C:\Users\MIDIASILK\Desktop\Junior\Android\cur
o-react-native\exercicios\android\app\build\generated\assets\react\release\inde
.android.bundle
bundle: Done writing bundle output


FAILURE: Build failed with an exception.

* What went wrong:
java.io.IOException: Unable to delete directory C:\Users\MIDIASILK\Desktop\Juni
r\Android\curso-react-native\exercicios\android\app\build\intermediates\blame\r
s\release.
> Unable to delete directory C:\Users\MIDIASILK\Desktop\Junior\Android\curso-re
ct-native\exercicios\android\app\build\intermediates\blame\res\release.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4m 27s
35 actionable tasks: 16 executed, 19 up-to-date
Could not build the app, read the error above for details.

Running C:\Users\MIDIASILK\AppData\Local\Android\Sdk/platform-tools/adb -s 8031
e9d reverse tcp:8081 tcp:8081
Installing the app on the device (cd android && adb -s 8031fe9d install app/bui
d/outputs/apk/app-debug.apk
adb: failed to stat app/build/outputs/apk/app-debug.apk: No such file or direct
ry
Command failed: C:\Users\MIDIASILK\AppData\Local\Android\Sdk/platform-tools/adb
-s 8031fe9d 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 8031fe9d (C:\Users\MIDIASILK\AppData\Local\Android\Sdk/plat
orm-tools/adb -s 8031fe9d shell am start -n com.exercicios/com.exercicios.MainA
tivity)...
Starting: Intent { cmp=com.exercicios/.MainActivity launchParam=MultiScreenLaun
hParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } }
Error type 3
Error: Activity class {com.exercicios/com.exercicios.MainActivity} does not exi
t.

I ran the same command on my phone and it worked.

    
asked by anonymous 03.12.2018 / 15:07

1 answer

1

I had the same problem. I think the problem is that Android Studio generates this app-debug.apk . For some reason in this directory

android/app/build/output/apk

But this directory has child directories, debuge and release . That's why the react-native-cli of this error, because it can not find the app-debug.apk that is in the debug directory.

I solved by changing app-debug.apk to

android/app/build/output/apk

    
03.12.2018 / 19:57