Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
827 views
in Technique[技术] by (71.8m points)

android - NetworkUtils class

I want to import NetworkUtils. Following command does not work.

 import android.net.NetworkUtils;

Other classes like WifiInfo can be imported.

Somewhere, I found it answered that NetworkUtils was not part of Android SDK and so, an SDK project cannot perform the import.

But is there a way to import android.net.NetworkUtils?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The class is not part of the SDK, this may be improved in future SDK releases : https://groups.google.com/forum/?fromgroups#!topic/android-developers/9Ux2zCqCMOA


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...