gpt4 book ai didi

android - 意外的响应代码 200

转载 作者:太空狗 更新时间:2023-10-29 14:41:26 26 4
gpt4 key购买 nike

12-02 12:26:58.984 4028-4069/com.example.sainathpawar.volleyimage E/Volley: [162] BasicNetwork.performRequest: Unexpected response code 200 for http://lorempixel.com/600/400/city/ 12-02 12:26:58.985 4028-4028/com.example.sainathpawar.volleyimage I/Error: Error 12-02 12:27:00.262 4028-4068/com.example.sainathpawar.volleyimage E/Volley: [161] BasicNetwork.performRequest: Unexpected response code 200 for http://lorempixel.com/600/400/city/ 12-02 12:27:00.264 4028-4028/com.example.sainathpawar.volleyimage I/Error: Error

出现上述错误此错误是什么意思?我正在尝试从 API“http://lorempixel.com/600/400/city/”获取图像是否与权限有关?

以下是我收到错误的代码。

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

final String myURL = "http://lorempixel.com/600/400/city/";

Button myButton = findViewById(R.id.button);
ImageView imageView = findViewById(R.id.imageView);
myButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ImageRequest imageRequest = new ImageRequest(myURL,
new Response.Listener<Bitmap>() {
@Override
public void onResponse(Bitmap response) {

}
}, 0, 0, null, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.i("Error","Error");
}
});
MySingleton.getmInstance(MainActivity.this).addToRequest(imageRequest);
}
});
}

}

最佳答案

我通过将域更改为真实 IP 地址来解决它:

var socket = io.connect('http://182.92.79.215:3007');

关于android - 意外的响应代码 200,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47605489/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com