1. Are you ready for the Galaxy S20? Here is everything we know so far!

Emulator won't display my Hello World app

Discussion in 'Android Development' started by Shelby Swayze, Aug 16, 2019.

  1. Shelby Swayze

    Shelby Swayze Newbie
    Thread Starter

    I can't find a solution to the emulator giving the following error message.
    Code (Text):
    1. Executing tasks: [:app:assembleDebug]
    2.  
    3. 7:25 AM    Emulator: dsound:
    4.  
    5. 7:25 AM    Emulator: Could not initialize DirectSoundCapture
    6.  
    7. 7:25 AM    Emulator: dsound: Reason: No sound
    8.  
    9. 7:25 AM    Emulator: driver is available for use, or the given GUID is not a valid DirectSound device ID
    10.  
    11. 7:25 AM    Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
    12.  
    13. 7:25 AM    Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
    14.  
    15. 7:25 AM    Emulator: audio: Failed to create voice `goldfish_audio_in'
    16.  
    17. 7:25 AM    Emulator: C:\Users\Shelby\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-i386.exe: warning: opening audio input failed
    18.  
    19. 7:25 AM    Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
    20.  
    21. 7:25 AM    Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
    22.  
    23. 7:25 AM    Emulator: audio: Failed to create voice `adc'
    Can someone point me in the right direction for my solution?

    I have tried a setting change on my Windows 10 and within the AVD manager box. I'm still searching google and can't find a remedy.

    Thanks
    Newbie Shelby with 1 year of B4A experience
     


    #1 Shelby Swayze, Aug 16, 2019
    Last edited: Aug 18, 2019

    1. Download the Forums for Android™ app!


      Download

       
  2. Shelby Swayze

    Shelby Swayze Newbie
    Thread Starter

    Thanks Sugar,
    6
    So far it didn't work but I'll leave the code as you suggested for now. I had seen the stackoverflow thread, but only now got around to changing the code as you mentioned. By the way, I never had the resources tags and related lines but I added them to no avail. I still get errors:

    Code (Text):
    1. Emulator: dsound: Could not initialize DirectSoundCapture
    2.  
    3. 6:59 AM    Emulator: dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID
    4.  
    5. 6:59 AM    Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
    6.  
    7. 6:59 AM    Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
    8.  
    9. 6:59 AM    Emulator: audio: Failed to create voice `goldfish_audio_in'
    10.  
    11. 6:59 AM    Emulator: C:\Users\S
     
    #2 Shelby Swayze, Aug 21, 2019
    Last edited: Aug 29, 2019
  3. Shelby Swayze

    Shelby Swayze Newbie
    Thread Starter

    Since I never seemed to notice any benefit from adding the resources tags and related code, I have removed them. Still I have no ability to bring up my app on the emulator.
    Here's my code before removing the resources code: (activity_main.xml)

    Code (Text):
    1. <?xml version="1.0" encoding="utf-8"?>
    2.  
    3. <resources>
    4.     <item name="workouttype" type="id" />
    5.     <item name="txthello" type="id"/>
    6. </resources>
    7.  
    8. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    9.     xmlns:app="http://schemas.android.com/apk/res-auto"
    10.     xmlns:tools="http://schemas.android.com/tools"
    11.     android:layout_width="match_parent"
    12.     android:layout_height="match_parent"
    13.     tools:context=".MainActivity">
    14.  
    15.     <EditText
    16.         android:id="@+id/editTextFirstName"
    17.         android:layout_width="wrap_content"
    18.         android:layout_height="wrap_content"
    19.         android:layout_marginTop="100dp"
    20.         android:ems="10"
    21.         android:inputType="textPersonName"
    22.         android:text="First Name"
    23.         app:layout_constraintEnd_toEndOf="parent"
    24.         app:layout_constraintStart_toStartOf="parent"
    25.         app:layout_constraintTop_toTopOf="parent" />
    26.  
    27.     <EditText
    28.         android:id="@+id/editTextLastName"
    29.         android:layout_width="wrap_content"
    30.         android:layout_height="wrap_content"
    31.         android:layout_marginTop="24dp"
    32.         android:ems="10"
    33.         android:inputType="textPersonName"
    34.         android:text="Last Name"
    35.         app:layout_constraintStart_toStartOf="@+id/editTextFirstName"
    36.         app:layout_constraintTop_toBottomOf="@+id/editTextFirstName" />
    37.  
    38.     <EditText
    39.         android:id="@+id/editTextEmail"
    40.         android:layout_width="wrap_content"
    41.         android:layout_height="wrap_content"
    42.         android:layout_marginTop="24dp"
    43.         android:ems="10"
    44.         android:inputType="textPersonName"
    45.         android:text="Email"
    46.         app:layout_constraintEnd_toEndOf="@+id/editTextLastName"
    47.         app:layout_constraintStart_toStartOf="@+id/editTextLastName"
    48.         app:layout_constraintTop_toBottomOf="@+id/editTextLastName" />
    49.  
    50.     <Button
    51.         android:id="@+id/btnRegister"
    52.         android:layout_width="wrap_content"
    53.         android:layout_height="wrap_content"
    54.         android:layout_marginTop="100dp"
    55.         android:text="Register"
    56.         app:layout_constraintEnd_toEndOf="@+id/editTextEmail"
    57.         app:layout_constraintStart_toStartOf="@+id/editTextEmail"
    58.         app:layout_constraintTop_toBottomOf="@+id/editTextEmail" />
    59.  
    60.     <TextView
    61.         android:id="@+id/textViewFirstName"
    62.         android:layout_width="wrap_content"
    63.         android:layout_height="wrap_content"
    64.         android:layout_marginTop="100dp"
    65.         android:text="First Name"
    66.         app:layout_constraintEnd_toEndOf="@+id/btnRegister"
    67.         app:layout_constraintStart_toStartOf="@+id/btnRegister"
    68.         app:layout_constraintTop_toBottomOf="@+id/btnRegister" />
    69.  
    70.     <TextView
    71.         android:id="@+id/textViewLastName"
    72.         android:layout_width="wrap_content"
    73.         android:layout_height="wrap_content"
    74.         android:layout_marginTop="24dp"
    75.         android:text="Last Name"
    76.         app:layout_constraintEnd_toEndOf="@+id/textViewFirstName"
    77.         app:layout_constraintHorizontal_bias="1.0"
    78.         app:layout_constraintStart_toStartOf="@+id/textViewFirstName"
    79.         app:layout_constraintTop_toBottomOf="@+id/textViewFirstName" />
    80.  
    81.     <TextView
    82.         android:id="@+id/textViewEmail"
    83.         android:layout_width="wrap_content"
    84.         android:layout_height="wrap_content"
    85.         android:layout_marginTop="24dp"
    86.         android:text="Email"
    87.         app:layout_constraintEnd_toEndOf="@+id/textViewLastName"
    88.         app:layout_constraintStart_toStartOf="@+id/textViewLastName"
    89.         app:layout_constraintTop_toBottomOf="@+id/textViewLastName" />
    90. </androidx.constraintlayout.widget.ConstraintLayout>
     
Loading...
Similar Threads - Emulator won't display
  1. Kingdr
    Replies:
    0
    Views:
    245
  2. Ginjitzu
    Replies:
    0
    Views:
    334
  3. etienne langevin
    Replies:
    0
    Views:
    206
  4. Balos1234
    Replies:
    0
    Views:
    528
  5. claytoncarney
    Replies:
    0
    Views:
    821
  6. Fabrizio Ferrari
    Replies:
    0
    Views:
    844
  7. raksheg
    Replies:
    0
    Views:
    805
  8. Mohamed13
    Replies:
    0
    Views:
    712
  9. AlexEv
    Replies:
    0
    Views:
    1,414
  10. АгентГосдепа
    Replies:
    0
    Views:
    5,198

Share This Page

Loading...