android - 无法为 1.13.0 版本的 SDK 导入 ParseImageView、ParseQueryAdapter

标签 android

我尝试使用下面的代码导入 com.parse.ParseImageViewcom.parse.ParseQueryAdapter。但它显示此错误:

错误:(26, 13) 解析失败:com.parse:parseui-login-android:0.0.1 错误:(27, 13) 解析失败:com.parse:parseui-widget-android:0.0.1

package com.example.satti.party;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.parse.ParseFile;
import com.parse.ParseImageView;
import com.parse.ParseObject;
import com.parse.ParseQuery;
import com.parse.ParseQueryAdapter;




public class customadp extends ParseQueryAdapter<ParseObject> {

public customadp(Context context) {
    // Use the QueryFactory to construct a PQA that will only show
    // Todos marked as high-pri
    super(context, new ParseQueryAdapter.QueryFactory<ParseObject>() {
        public ParseQuery create() {
            ParseQuery query = new ParseQuery("city");
            query.whereEqualTo("highPri", true);
            return query;
        }
    });
}

// Customize the layout by overriding getItemView
@Override
public View getItemView(ParseObject object, View v, ViewGroup parent) {
    if (v == null) {
        v = View.inflate(getContext(), R.layout.actvity_priest1, null);
    }

    super.getItemView(object, v, parent);

    // Add and download the image
    ParseImageView todoImage = (ParseImageView) v.findViewById(R.id.icon);
    ParseFile imageFile = object.getParseFile("image");
    if (imageFile != null) {
        todoImage.setParseFile(imageFile);
        todoImage.loadInBackground();
    }

    // Add the title view
    TextView titleTextView = (TextView) v.findViewById(R.id.txt);
    titleTextView.setText(object.getString("title"));

    // Add a reminder of how long this item has been outstanding
    TextView timestampView = (TextView) v.findViewById(R.id.cur);
    timestampView.setText(object.getCreatedAt().toString());
    return v;
}

}

最佳答案

在 dependencies 标签下添加 gradle build 文件:

compile 'com.parse:parseui-widget-android:0.0.1',
compile 'com.parse:parseui-login-android:0.0.1' 

关于android - 无法为 1.13.0 版本的 SDK 导入 ParseImageView、ParseQueryAdapter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35687196/

相关文章:

android - Jetpack Compose 中的图像裁剪器?

java - Android 向某个方向移动位图

Android 获取随机联系人

java - 使用官方下载和许可库在设备上启动应用程序时,使用 Proguard 混淆 Android 应用程序会导致致命异常

android - 动态添加一个Textview

android - 禁用或修改整个手机的物理按钮功能

java - 如何使用 Robolectric 测试 AsyncTask?

android - 切换到另一个 Activity 时进度对话框卡住

android - 有没有办法获取 IBinder 实例的 UID 或 PID?

java - Android 日历 API 与事件