Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot resolve symbol Builder android [duplicate]

Tags:

java

android

This is my code for posting data to Google Forms. I used OkHTTP3 for sending request.

okhttp3.Request request = new Request.Builder().url(url).post(body).build();

In the above code, it shows cannot resolve symbol Builder.

I have also imported the below packages

import okhttp3.OkHttpClient;
import okhttp3.RequestBody;
import okhttp3.Response;

and included the below package in the gradle file

compile 'com.squareup.okhttp3:okhttp:3.0.1'

1 Answers

Replace

okhttp3.Request request = new Request.Builder().url(url).post(body).build();

with

okhttp3.Request request = new okhttp3.Request.Builder().url(url).post(body).build();

It should work.

like image 184
Saurabh Avatar answered Mar 23 '26 18:03

Saurabh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!