title: Android : 5.0 : WebChromeClient.FileChooserParams cannot be resolved to a type
body: <p>I am trying to make my webview compatible with android 5.0 for the upload file purposes.My build target is API19 4.4.2 . I have download 5.0 sdk and it dependencies.  I am getting an error WebChromeClient.FileChooserParams cannot be resolved to a type</p>
  
  <p><strong>I found this code on Stackoverflow.</strong></p>
  
  <pre><code>  webView = (WebView) findViewById(R.id.webView1);
  
              webView.setWebChromeClient(new WebChromeClient() {
                  public boolean onShowFileChooser(
                          WebView webView, ValueCallback&lt;Uri[]&gt; filePathCallback,
                          WebChromeClient.FileChooserParams fileChooserParams) {
  
                      // Double check that we don't have any existing callbacks
                      if(mFilePathCallback != null) {
                          mFilePathCallback.onReceiveValue(null);
                      }
                      mFilePathCallback = filePathCallback;
  
                      // Set up the take picture intent
                      Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                      if (takePictureIntent.resolveActivity(MainActivity.this.getPackageManager()) != null) {
                          // Create the File where the photo should go
                          File photoFile = null;
                          try {
                              photoFile = createImageFile();
                              takePictureIntent.putExtra("PhotoPath", mCameraPhotoPath);
                          } catch (IOException ex) {
                              // Error occurred while creating the File
                              Log.e(TAG, "Unable to create Image File", ex);
                          }
  
                          // Continue only if the File was successfully created
                          if (photoFile != null) {
                              mCameraPhotoPath = "file:" + photoFile.getAbsolutePath();
                              takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,
                                      Uri.fromFile(photoFile));
                          } else {
                              takePictureIntent = null;
                          }
                      }
  
                      // Set up the intent to get an existing image
                      Intent contentSelectionIntent = new Intent(Intent.ACTION_GET_CONTENT);
                      contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE);
                      contentSelectionIntent.setType("image/*");
  
                      // Set up the intents for the Intent chooser
                      Intent[] intentArray;
                      if(takePictureIntent != null) {
                          intentArray = new Intent[]{takePictureIntent};
                      } else {
                          intentArray = new Intent[0];
                      }
  
                      Intent chooserIntent = new Intent(Intent.ACTION_CHOOSER);
                      chooserIntent.putExtra(Intent.EXTRA_INTENT, contentSelectionIntent);
                      chooserIntent.putExtra(Intent.EXTRA_TITLE, "Image Chooser");
                      chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, intentArray);
  
                      startActivityForResult(chooserIntent, INPUT_FILE_REQUEST_CODE);
  
                      return true;
                  }
          });
  </code></pre>
  
  <p><strong>Issue</strong> 
  <a href="https://i.stack.imgur.com/u7RTW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u7RTW.png" alt="enter image description here"></a></p>