title: Android RTP. Incompatible types: Object cannot be converted.
body: <p>I got an error message when trying to play around with Android RTP.</p>
  
  <pre><code>Error:(49, 55) error: incompatible types: Object cannot be converted to NetworkInterface
  Error:(51, 69) error: incompatible types: Object cannot be converted to InetAddress
  </code></pre>
  
  <p>My code like this one</p>
  
  <pre><code>for (Enumeration en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
              NetworkInterface intf = en.nextElement(); //first error message
              for (Enumeration enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {
                  InetAddress inetAddress = enumIpAddr.nextElement(); //second error message
                  if (!inetAddress.isLoopbackAddress()) {
                      ip= inetAddress.getAddress();
                  }
              }
          }
  </code></pre>