问题遇到的现象和发生背景
Android studio运行一个新闻的app在自己的手机上,但是一直出不来结果一直不断的闪退
问题相关代码,请勿粘贴截图
<?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:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
>
<ImageView
android:id="@+id/add_iv_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:src="@mipmap/bar_img_back"
android:layout_centerVertical="true"/>
<TextView
android:id="@+id/add_tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="频道订阅"
android:textColor="@color/grey"
android:layout_centerInParent="true"
android:textSize="20sp"/>
</RelativeLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/black"/>
<ListView
android:id="@+id/add_lv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/grey"
android:dividerHeight="1dp"></ListView>
</LinearLayout>
package com.animee.news_info.bean;
public class NewsURL {
// 公共的key http://v.juhe.cn/toutiao/index?key=0af60a86bfa3575d53c1491d1be310ca&type=top
public static String key = "0af60a86bfa3575d53c1491d1be310ca";
public static String info_url = "http://v.juhe.cn/toutiao/index?key="+key+"&type=";
// 头条
public static String headline_url = info_url +"top";
// 社会
public static String society_url = info_url +"shehui";
// 国内
public static String home_url = info_url +"guonei";
// 国际
public static String internation_url = info_url+"guoji";
// 娱乐
public static String entertainment_url = info_url+"yule";
// 体育
public static String sport_url = info_url+"tiyu";
// 军事
public static String military_url = info_url+"junshi";
// 科技
public static String science_url = info_url+"keji";
// 财经
public static String finance_url = info_url+"caijing";
// 时尚
public static String fashion_url = info_url+"shishang";
}
运行结果及报错内容
闪退
我的解答思路和尝试过的方法
我想要达到的结果
请问如何解决这个问题是我的版本问题吗