Error: Intent, View cannot be resolved to a type.

You may get this error during compilation of the Android project if you have declared/used a Intent variable in your code. The error appears because the Intent type is unknown to compiler, I mean you have not included a library which describes the Intent type. 


Resolution: 
In order to resolve the error include following line in our project 
    import android.content.Intent;


Including the above line will cause compiler to search the Indent definition which is declared in android.content.Indent package.
You may also get "Error: View cannot be resolved to a type" if you have used View object in your code.  To resolve view related error "import android.view.View;" in your code.





1 comment:

Golang: Http POST Request with JSON Body example

Go standard library comes with "net/http" package which has excellent support for HTTP Client and Server.   In order to post JSON ...