Black screen in android emulator

Asked

Viewed 3,118 times

1

I’m trying to start the emulator by android studio and genymotion but in both is a black screen in emulator:

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

It may be my graphics card that is terrible, but would 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 with the mobile phone of my use and it worked, then I tried with a mobile phone I bought for it (J5 metal) but keeps giving error

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 remote on my phone and it worked.

1 answer

2


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 that mistake, because it cannot find the app-debug.apk that’s in the directory debug.

I decided to change the app-debug.apk for

android/app/build/output/apk

Browser other questions tagged

You are not signed in. Login or sign up in order to post.