Sultan Ahmed
Sultan Ahmed

Reputation: 2220

cannot resolve symbol Network android studio

I am running android project. But I am getting the following error:

/home/sultan/StudioProjects/android-client/app/src/main/java/edu/cmu/cs/gabriel/network/ResultReceivingThread.java:23: error: cannot find symbol
import android.net.Network;
                  ^
  symbol:   class Network
  location: package android.net
Note: /home/sultan/StudioProjects/android-client/app/src/main/java/edu/cmu/cs/gabriel/CameraPreview.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

The error is in this line:

import android.net.Network

I don't understand how to resolve this error. Please help me.

Upvotes: 2

Views: 2215

Answers (1)

Amit
Amit

Reputation: 3702

Is your target SDK version less than 21 in your build.gradle file?

android.net.Network was added in API label 21.

Upvotes: 1

Related Questions