我正在顯示與虛擬數據課程列表。我正在使用自定義 佈局來顯示課程。從服務器獲取對象列表。 在調試模式下或在設備上運行應用程序 時,一切正常。Android列表查看數據不顯示在生產模式APK
現在,當我建立生產模式簽署APK列表 的數據顯示不出來。數據來自服務器,也是成功映射到列表中的 。但它沒有出現。
這裏是我的自定義佈局文件的代碼。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tvCourseName"
android:gravity="center"
android:textSize="22sp"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:textColor="@color/main"
android:background="@drawable/background_course_name"
android:text="@string/english"/>
</RelativeLayout>
這裏是適配器的代碼。
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = LayoutInflater.from(getContext());
View view = inflater.inflate(R.layout.course_row_layout,parent,false);
response = getItem(position);
tvCourseName = (TextView)view.findViewById(R.id.tvCourseName);
tvCourseName.setText(response.getTitle());
return view;
}
發表您的logcat和gradle這個文件,彩色文件也 –
編輯你的問題,並提供必要的文件 –
的http://計算器。 com/questions/31590714/getcolorint-id-deprecated-on-android-6-0-marshmallow-api-23 –