【问题标题】:can not resolve variable volley无法解决可变截击
【发布时间】:2016-12-02 22:45:18
【问题描述】:

我正在尝试在 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());

最后一行的关键词(volley)是红色的,虽然我已经在 libs 文件夹中添加了 volley 库。还在 gradle 文件中添加了 volley 库,但仍然无法正常工作..

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

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

【问题讨论】:

    标签: php android mysql android-volley


    【解决方案1】:

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

    (...) 此项目已弃用,不再维护,请使用 jCenter 的官方版本。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-15
      • 1970-01-01
      • 1970-01-01
      • 2018-06-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-11
      • 1970-01-01
      相关资源
      最近更新 更多