国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

這篇具有很好參考價值的文章主要介紹了簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

提示:本篇文章將會盡量保持精簡,同時請諸位敲寫代碼時保持耐心,三連是最大的支持!

文章目錄

前言

一、項(xiàng)目介紹

二、使用步驟

1.創(chuàng)建程序

2.添加 recyclerview-v7 庫

3.放置界面控件

4.搭建界面布局

5.封裝實(shí)體類

6.編寫數(shù)據(jù)適配器

7.實(shí)現(xiàn)顯示界面數(shù)據(jù)功能

8.去掉默認(rèn)標(biāo)題欄,添加讀取系統(tǒng)通訊錄權(quán)限

9.運(yùn)行程序

總結(jié)


前言

本篇文章將會介紹如何使用?Android studio?內(nèi)容提供者 實(shí)現(xiàn) “讀取手機(jī)通訊錄” 的項(xiàng)目,文章是經(jīng)由本人實(shí)際編寫過后得出,同時項(xiàng)目中的名稱等如有沖突可自行更改。文章盡量保持精簡,也請諸位保持耐心,且會加以圖文解釋,方便讀者能夠更佳觀看。

配置:Android studio 2021.1.1.21 windows??簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人


一、項(xiàng)目介紹

本項(xiàng)目通過顯示一個通訊錄的界面,以列表的形式來顯示 Android 設(shè)備通訊錄中暴露的數(shù)據(jù), 而 Android 便提供了一個組件 ContentProvider(內(nèi)容提供者) 來充當(dāng)一個 “中介” 的角色。具體有關(guān) ContentProvider(內(nèi)容提供者) 的細(xì)節(jié)在這就不再贅述。

二、使用步驟

1.創(chuàng)建程序

打開 Android studio,在 Android studio 創(chuàng)建一個新的應(yīng)用程序,命名為 Contact?,指定包名為 com.itcast.contacts 。

2.添加 recyclerview-v7 庫

因?yàn)槲覀兺ㄓ嶄浗缑鎸⒁褂玫?RecyclerView 控件,以列表的形式展示,所以需要將擁有? RecyclerView 控件的 recyclerview-v7 庫添加進(jìn)程序。但是由于版本和補(bǔ)丁的更新,我們只需要在 Android 的?Gradle Scripts 下的 build.gradle(Module:Contact.app) 中填入一下代碼

代碼如下:

dependencies {
// 。。。。。
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}

更為詳細(xì)的說明可以移步到:簡單步驟:解決 Android studio 2021.1.1 出現(xiàn)添加 “ recyclerview-v7 庫 ”報(bào)錯_蛇形刁手的博客-CSDN博客

3.放置界面控件

在 res/layout 文件夾的 activity_contact.xml 下放置一個 TextView控件 和 RecyclerView 控件來以列表的形式顯示通訊錄和其中聯(lián)系人的信息。?

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

??代碼如下:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#eaeaea"
    android:orientation="vertical">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:background="#4889f4"
        android:gravity="center"
        android:text="通訊錄"
        android:textColor="@android:color/white"
        android:textSize="20sp" />
    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_contact"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="5dp" />
</LinearLayout>

4.搭建界面布局

<1> 在 res/layout 文件夾下,創(chuàng)建布局文件 contact_item.xml , 編寫界面控件。

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

?代碼如下:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    android:background="@drawable/item_bg"
    android:orientation="horizontal"
    android:padding="8dp">
    <ImageView
        android:id="@+id/iv_photo"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:src="@drawable/contact_photo" />
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:layout_marginLeft="8dp"
        android:gravity="center_vertical"
        android:orientation="vertical">
        <TextView
            android:id="@+id/tv_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@android:color/black"
            android:textSize="16sp" />
        <TextView
            android:id="@+id/tv_phone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:textColor="@android:color/darker_gray"
            android:textSize="14sp" />
    </LinearLayout>
</LinearLayout>

<2> 導(dǎo)入圖片

將通訊錄界面所需要的圖片 contact_photo.png 導(dǎo)入到 res/drewable?文件夾中。(如果文章會自動生成水印,那么推薦使用自己的圖片)

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

圖片如下:

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

<3> 創(chuàng)建條目界面的背景文件

在res/drewable?文件夾中創(chuàng)建 item_bg.xml文件設(shè)置條目背景。

代碼如下:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#ffffff" />
    <corners android:radius="8dp" />
</shape>

?5.封裝實(shí)體類

在程序的 java/com.itcast.contacts 包下創(chuàng)建一個 ContactInfo 類,用來創(chuàng)建聯(lián)系人信息的屬性。

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

?代碼如下:

package com.itcast.contacts;
public class ContactInfo {
    private String contactName;   //聯(lián)系人名稱
    private String phoneNumber;   //電話號碼
    public String getContactName() {
        return contactName;
    }
    public void setContactName(String contactName) {
        this.contactName = contactName;
    }
    public String getPhoneNumber() {
        return phoneNumber;
    }
    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }
}

6.編寫數(shù)據(jù)適配器

在程序的 java/com.itcast.contacts 包下創(chuàng)建一個 ContactAdapter?類,由于我們使用了 RecyclerView 控件,所以就需要創(chuàng)建一個數(shù)據(jù)適配器,來對 RecyclerView 控件進(jìn)行數(shù)據(jù)適配。

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

?代碼如下:

package com.itcast.contacts;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

import java.util.List;

public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter
        .MyViewHolder>  {
    private Context mContext;
    private List<ContactInfo> contactInfoList;
    public ContactAdapter(Context context, List<ContactInfo> contactInfoList){
        this.mContext=context;
        this.contactInfoList=contactInfoList;
    }
    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        MyViewHolder holder = new MyViewHolder(
                LayoutInflater.from(mContext).inflate(
                        R.layout.contact_item, parent, false));
        return holder;
    }
    @Override
    public void onBindViewHolder(MyViewHolder holder, int position) {
        holder.tv_name.setText(contactInfoList.get(position).getContactName());
        holder.tv_phone.setText(contactInfoList.get(position).getPhoneNumber());
    }
    @Override
    public int getItemCount() {
        return contactInfoList.size();
    }
    class MyViewHolder extends RecyclerView.ViewHolder {
        TextView tv_name,tv_phone;
        ImageView iv_photo;
        public MyViewHolder(View view) {
            super(view);
            tv_name = view.findViewById(R.id.tv_name);
            tv_phone = view.findViewById(R.id.tv_phone);
            iv_photo = view.findViewById(R.id.iv_photo);
        }
    }
}

7.實(shí)現(xiàn)顯示界面數(shù)據(jù)功能

在程序的 java/com.itcast.contacts 包下創(chuàng)建一個 ContactActivity 類, 來申請讀取手機(jī)通訊錄的權(quán)限,同時重寫 onRequestPermissionsResult () 方法獲取通訊錄權(quán)限是否申請成功。

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

?代碼如下:

package com.itcast.contacts;

import android.annotation.SuppressLint;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.os.Build;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

public class ContactActivity extends AppCompatActivity {
    private ContactAdapter adapter;
    private RecyclerView rv_contact;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_contact);
        init();
    }
    private void setData(){
        List<ContactInfo> contactInfos=getContacts();
        adapter=new ContactAdapter(ContactActivity.this,contactInfos);
        rv_contact.setAdapter(adapter);
    }
    public List<ContactInfo> getContacts() {
        List<ContactInfo> contactInfos = new ArrayList<>();
        Cursor cursor = getContentResolver().query(ContactsContract.
                Contacts.CONTENT_URI, null, null, null, null);
        if (contactInfos!=null)contactInfos.clear();//清除集合中的數(shù)據(jù)
        while (cursor.moveToNext()) {
            @SuppressLint("Range") String id = cursor.getString(
                    cursor.getColumnIndex(ContactsContract.Contacts._ID));
            @SuppressLint("Range") String name = cursor.getString (cursor.getColumnIndex(ContactsContract.
                    Contacts.DISPLAY_NAME));
            @SuppressLint("Range") int isHas = Integer.parseInt(cursor.getString(cursor.getColumnIndex(
                    ContactsContract.Contacts.HAS_PHONE_NUMBER)));
            if (isHas > 0) {
                Cursor c = getContentResolver().query(ContactsContract.
                                CommonDataKinds.Phone.CONTENT_URI, null,
                        ContactsContract.CommonDataKinds.Phone.CONTACT_ID +
                                " = " + id, null, null);
                while (c.moveToNext()) {
                    ContactInfo info = new ContactInfo();
                    info.setContactName(name);
                    @SuppressLint("Range") String number = c.getString(c.getColumnIndex(ContactsContract.
                            CommonDataKinds.Phone.NUMBER)).trim();
                    number = number.replace(" ", "");
                    number = number.replace("-", "");
                    info.setPhoneNumber(number);
                    contactInfos.add(info);
                }
                c.close();
            }
        }
        cursor.close();
        return contactInfos;
    }
    private void init(){
        rv_contact=findViewById(R.id.rv_contact);
        rv_contact.setLayoutManager(new LinearLayoutManager(this));
        getPermissions();
    }
    String[] permissionList;
    public void getPermissions() {
        if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            permissionList = new String[]{"android.permission.READ_CONTACTS"};
            ArrayList<String> list = new ArrayList<String>();
            // 循環(huán)判斷所需權(quán)限中有哪個尚未被授權(quán)
            for (int i = 0; i < permissionList.length; i++) {
                if (ActivityCompat.checkSelfPermission(this, permissionList[i])
                        != PackageManager.PERMISSION_GRANTED)
                    list.add(permissionList[i]);
            }
            if (list.size() > 0) {
                ActivityCompat.requestPermissions(this,
                        list.toArray(new String[list.size()]), 1);
            } else {
                setData();//后續(xù)創(chuàng)建該方法
            }
        } else {
            setData();  //后續(xù)創(chuàng)建該方法
        }
    }
    @Override
    public void onRequestPermissionsResult(int requestCode, String[] permissions,
                                           int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        if (requestCode == 1) {
            for (int i = 0; i < permissions.length; i++) {
                if(permissions[i].equals("android.permission.READ_CONTACTS")
                        && grantResults[i] == PackageManager.PERMISSION_GRANTED){
                    Toast.makeText(this, "讀取通訊錄權(quán)限申請成功",
                            Toast.LENGTH_SHORT).show();
                    setData();//后續(xù)創(chuàng)建該方法
                }else{
                    Toast.makeText(this,"讀取通訊錄權(quán)限申請失敗",
                            Toast.LENGTH_SHORT).show();
                }
            }
        }
    }

}

8.去掉默認(rèn)標(biāo)題欄,添加讀取系統(tǒng)通訊錄權(quán)限

<1> 在 AndroidManifest.xml 文件的 <application> 標(biāo)簽下修改標(biāo)題欄,使標(biāo)題欄更加美觀。

<2> 因?yàn)槲覀冃枰褂玫较到y(tǒng)的通訊錄,所以還要在?AndroidManifest.xml 文件中添加讀取系統(tǒng)通訊錄權(quán)限

<3> 同時解決可能會出現(xiàn)虛擬器運(yùn)行后“ xxx has stopped"的錯誤,詳細(xì)內(nèi)容可以移步到:簡單步驟:解決 Android studio 出現(xiàn) “ xxx(項(xiàng)目名) has stopped ” 的錯誤_蛇形刁手的博客-CSDN博客

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

?代碼如下:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.itcast.contacts">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppCompat.NoActionBar">
        <activity
            android:name=".ContactActivity"
            android:exported="true"
            tools:ignore="MissingClass">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-permission android:name="android.permission.READ_CONTACTS" />
</manifest>

9.運(yùn)行程序

第一次運(yùn)行時,會彈出一個 “ Allow Contacts to access your contacts?” 窗口,有兩個選項(xiàng): “ ALLOW ” 表示允許讀取 和 “ DENY ” 拒絕讀取,我們點(diǎn)擊允許讀取。當(dāng)?shù)谝淮芜\(yùn)行時,我們的通訊錄界面是一片空白,需要我們在系統(tǒng)的通訊錄輸入聯(lián)系人信息予以提供。重新切換到我們的通訊錄界面后便會出現(xiàn)信息。

圖文解釋如下:

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人

簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人


總結(jié)

以上就是 Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)讀取手機(jī)通訊錄的具體操作,由于每個人的配置、編寫習(xí)慣等等多種原因,如果在實(shí)際操作中出現(xiàn)問題,或者發(fā)現(xiàn)文章中的錯誤,也可以在評論區(qū)中發(fā)表出來,盡能所答,歡迎指點(diǎn)與建議。

如果感到有幫助!?。?/strong>

編寫不易,關(guān)注、三連是最大的支持?。?!

歡迎建議,感謝支持?。?!文章來源地址http://www.zghlxwxcb.cn/news/detail-483200.html

到了這里,關(guān)于簡單步驟:Android studio 內(nèi)容提供者 - 實(shí)現(xiàn)建立手機(jī)通訊錄界面,讀取系統(tǒng)聯(lián)系人的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • SpringCloud Eureka注冊服務(wù)提供者(七)

    SpringCloud Eureka注冊服務(wù)提供者(七)

    這里我們在原來的服務(wù)提供者項(xiàng)目 microservice-student-provider-1001 ?上面直接修改: dependency ? ? groupIdorg.springframework.cloud/groupId ? ? artifactIdspring-cloud-starter-eureka/artifactId /dependency dependency ? ? groupIdorg.springframework.cloud/groupId ? ? artifactIdspring-cloud-starter-config/artifactId /dependency eurek

    2024年02月09日
    瀏覽(21)
  • RpcProvider(rpc服務(wù)提供者)實(shí)現(xiàn)思路

    上一節(jié)說到,如何將一個本地服務(wù)發(fā)布成遠(yuǎn)程服務(wù),但沒有說明一個rpc框架怎么進(jìn)行調(diào)用的,看看上節(jié)代碼 現(xiàn)在實(shí)現(xiàn)的發(fā)布服務(wù)方,那么顯然Login方法是rpc框架幫我們調(diào)用的,什么時候調(diào)用?當(dāng)rpc客戶端通過網(wǎng)絡(luò)發(fā)送rpc調(diào)用請求之后,這邊接收到rpc請求,解析請求然后調(diào)用發(fā)

    2024年02月14日
    瀏覽(19)
  • 【spring cloud學(xué)習(xí)】4、創(chuàng)建服務(wù)提供者

    【spring cloud學(xué)習(xí)】4、創(chuàng)建服務(wù)提供者

    注冊中心Eureka Server創(chuàng)建并啟動之后,接下來介紹如何創(chuàng)建一個Provider并且注冊到Eureka Server中,再提供一個REST接口給其他服務(wù)調(diào)用。 首先一個Provider至少需要兩個組件包依賴:Spring Boot Web服務(wù)組件和Eureka Client組件。如下所示: Spring Boot Web服務(wù)組件用于提供REST接口服務(wù),Eure

    2024年02月11日
    瀏覽(18)
  • 服務(wù)提供者 Eureka + 服務(wù)消費(fèi)者(Rest + Ribbon)實(shí)戰(zhàn)

    服務(wù)提供者 Eureka + 服務(wù)消費(fèi)者(Rest + Ribbon)實(shí)戰(zhàn)

    Ribbon是Netflix發(fā)布的開源項(xiàng)目,主要功能是提供客戶端的軟件負(fù)載均衡算法,將Netflix的中間層服務(wù)連接在一起。Ribbon客戶端組件提供一系列完善的配置項(xiàng)如連接超時,重試等。簡單來說,就是在配置文件中列出Load Balancer(簡稱LB)后面所有的機(jī)器,Ribbon會自動的幫助你基于某

    2024年02月04日
    瀏覽(23)
  • 記一次dubbo消費(fèi)者注冊失敗找不到服務(wù)提供者問題

    項(xiàng)目分多套環(huán)境,其中一套環(huán)境重新部署時,頻繁出現(xiàn)消費(fèi)者找不到服務(wù)提供者的錯誤 經(jīng)過多次重啟后才有可能恢復(fù)正常,而其他環(huán)境并沒有發(fā)現(xiàn)此問題 懷疑點(diǎn): 1.消費(fèi)者和服務(wù)提供者dubbo版本對不上 2.服務(wù)提供者沒有注冊上服務(wù) 3.注冊中心有問題 逐一排查: 1.消費(fèi)者和服

    2023年04月18日
    瀏覽(20)
  • SpringCloud學(xué)習(xí)筆記(三)_服務(wù)提供者集群與服務(wù)發(fā)現(xiàn)Discovery

    SpringCloud學(xué)習(xí)筆記(三)_服務(wù)提供者集群與服務(wù)發(fā)現(xiàn)Discovery

    既然SpringCloud的是微服務(wù)結(jié)構(gòu),那么對于同一種服務(wù),當(dāng)然不可能只有一個節(jié)點(diǎn),需要部署多個節(jié)點(diǎn) 架構(gòu)圖如下: 由上可以看出存在多個同一種服務(wù)提供者(Service Provider) 搭建服務(wù)提供者集群 1、參考:SpringCloud 快速入門搭建單機(jī)版的:Eureka Server、Service Provider、Service Con

    2024年02月11日
    瀏覽(21)
  • dubbo啟動報(bào)錯 java.lang.reflect.InvocationTargetException null 沒有提供者沒有消費(fèi)者

    dubbo啟動報(bào)錯 java.lang.reflect.InvocationTargetException null 沒有提供者沒有消費(fèi)者

    啟動dubbo時,控制臺報(bào)錯信息如下。 打開dubbo的服務(wù)注冊中心發(fā)現(xiàn) 在網(wǎng)上查找了一番,網(wǎng)上的說發(fā)眾說飛云,有人說要保證提供者和消費(fèi)者的包名一致,也有人說是ip的問題要在host里面配置, 后來經(jīng)過一番仔細(xì)查找發(fā)現(xiàn)不對的地方了 服務(wù)提供者的主類上沒有配置注解,這個

    2024年02月13日
    瀏覽(24)
  • CSDN博客批量查詢質(zhì)量分https://yma16.inscode.cc/請求超時問題(設(shè)置postman超時時間)(接口提供者設(shè)置了nginx超時時間)

    CSDN博客批量查詢質(zhì)量分https://yma16.inscode.cc/請求超時問題(設(shè)置postman超時時間)(接口提供者設(shè)置了nginx超時時間)

    https://yma16.inscode.cc/ 查詢別人的一下子就返回了,查詢我自己的,1分鐘還不返回,然后就顯示超時了。。 一開始我還以為是這個開源項(xiàng)目本身的問題,設(shè)置了請求超時時間,我還給它改了超時時間,后來發(fā)現(xiàn)不是的。。。 本來是100000的,我給改成1000000了,我對js代碼不熟,

    2024年02月12日
    瀏覽(93)
  • Android Studio 實(shí)現(xiàn)天氣預(yù)報(bào)App (簡單方便展示內(nèi)容超多)

    Android Studio 實(shí)現(xiàn)天氣預(yù)報(bào)App (簡單方便展示內(nèi)容超多)

    ?? 文章末尾有獲取完整項(xiàng)目源碼方式 ?? 目錄 前言 一、任務(wù)介紹 1.1 背景 1.2目的和意義 二、?實(shí)現(xiàn)介紹 視頻演示 2.1 啟動頁實(shí)現(xiàn) 2.2注冊頁面實(shí)現(xiàn) 2.3 登陸頁面實(shí)現(xiàn) 2.4 首頁實(shí)現(xiàn) 2.5 城市管理列表頁面實(shí)現(xiàn)??????????????? 三、獲取源碼 ????????在使用Android Studio開發(fā)

    2024年04月24日
    瀏覽(27)
  • Android Studio漢化教程/編輯器界面轉(zhuǎn)換為中文(簡單步驟)

    Android Studio漢化教程/編輯器界面轉(zhuǎn)換為中文(簡單步驟)

    此方法很簡單,只需要下載插件引入即可 前往下方鏈接,然后點(diǎn)擊GET,Download對應(yīng)版本(建議不要下載太新版本,不然會不兼容,可以下載Android Studio適應(yīng)的版本) https://plugins.jetbrains.com/plugin/13710-chinese-simplified-language-pack---- 這里有適用的版本 然后解壓剛剛下載的zip 打開設(shè)置

    2024年02月12日
    瀏覽(21)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包