相机/在Android Studio中下载其他人的项目时出错

时间:2019-07-01 19:03:11

标签: java android android-studio

我从github和不同的站点下载了多个项目,因为我在android studio中弄乱相机,但是尝试运行它们时却遇到相同的错误。我从enter image description here下载了另一个项目,但遇到了同样的错误,因此我放弃并决定发布此问题。

class Ticket():
    def __init__(self, dictionary):
        contacts_list = []

        self.first_name = dictionary['first_name']
        self.last_name = dictionary['last_name']
        self.contacts = contacts_list.get_contacts(dictionary, contacts_list)


def get_contacts(dictionary, contacts_list):
    counter = 0
    search_dict = {
        "name" : "name" + str(counter),
        "email" : "email" + str(counter),
        "phone" : "phone" + str(counter),
    }
    while search_dict["name"] in dictionary:
        contact = []
        contact.append(result[search_dict["name"]])
        contact.append(result[search_dict["email"]])
        contact.append(result["phone"])
        contacts_list.append(contact)
        counter = update_search_keys(search_dict, counter)


def update_search_keys(dict, counter):
    counter += 1
    for key in dict:
        dict[key] = key + str(counter)
    return counter

0 个答案:

没有答案