php - 无法解析变量 Volley

标签 php android mysql android-volley

我正在尝试在wamp phpmyadmin上发送数据。我正在使用volley库发送本地主机上mysql数据库中的数据,但是我的代码中的volley是红色的,给出错误(无法解析符号volley)。我已经在 libs 文件夹中添加了 volley 库,但问题仍然存在。

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


    emailHint = (EditText) findViewById(R.id.emailHint);
    userNameHint = (EditText) findViewById(R.id.UserHint);
    passHint = (EditText) findViewById(R.id.enterPass);
    reenterHint = (EditText) findViewById(R.id.Reenter);

    back = (Button) findViewById(R.id.BACK);
    ok = (Button) findViewById(R.id.OK);
    requestQueue = volley.newRequestQueue(getApplicationContext());

尽管我已经在 libs 文件夹中添加了 volley 库,但最后一行中的关键字(volley)是红色的。还在 gradle 文件中添加了 volley 库,但仍然不起作用..

compile 'com.mcxiaoke.volley:library:1.0.0'

任何人都可以解决这个问题吗?

最佳答案

Repository com.mcxiaoke.volley 基本上是 Google 库的一个分支,所以我想你只能使用官方版本。另请注意,根据mcxiaoke/android-volley READ.ME:

(...) this project is deprecated and no longer being maintained, please use official version from jCenter.

compile 'com.android.volley:volley:1.0.0'

关于php - 无法解析变量 Volley ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40942000/

相关文章:

php - 如何从sql查询创建mysql数据库

mysql - 查询 MySQL 日期时间字段中 11 个月前的任何记录

php - 如何将输入时间的值插入到数据库表中?

php - fatal error : Unsupported operand types

php - 如何优化MySQL UPDATE请求?

android - 带对讲机实时 : No realtime endpoints present so we can't connect

android - 单击通知后启动器 Activity 将打开(应用程序已关闭)

php - 正则表达式将文本月份更改为数字

php - Controller 的 Symfony MVC 最佳实践

java - Android 查看后保存图像