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'
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With