xiaohaibin / openeyes Goto Github PK
View Code? Open in Web Editor NEW:fire: 仿【开眼视频】客户端,一款精美的短视频应用
License: Apache License 2.0
:fire: 仿【开眼视频】客户端,一款精美的短视频应用
License: Apache License 2.0
为什么有些类是这样命名的呢?
eg: Find_detail_Activity
Common_find_Fragment
common_hot_fragment
而不是FindDetailActivity
CommonFindFragment
CommonHotFragment
提示如下:
-classes.dex"],nativeLibraryDirectories=[/data/app/com.stx.openeyes-1/lib/arm64, /system/fake-libs64, /data/app/com.stx.openeyes-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "libvinit.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:972)
at java.lang.System.loadLibrary(System.java:1530)
at io.vov.vitamio.Vitamio.(Vitamio.java:258)
at com.stx.openeyes.view.activity.ShowVideoActivity.onCreate(ShowVideoActivity.java:43)
引入了aar,删除了你这个目录下的vitamio.(自带的这个也是同样崩溃),手机小米5
项目很不错,但就是总会出现三个Fragment白屏的问题。
09-05 20:54:27.254 18904-19004/com.stx.openeyes E/Volley: [71628] NetworkDispatcher.run: Unhandled exception java.lang.RuntimeException: Bad URL null
java.lang.RuntimeException: Bad URL null
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:151)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:114)
Caused by: java.net.MalformedURLException
at java.net.URL.(URL.java:152)
at java.net.URL.(URL.java:125)
at com.android.volley.toolbox.HurlStack.performRequest(HurlStack.java:102)
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:97)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:114)
请问这是什么原因呢?
你在说明里面写了,您的这个项目是采用MVC结构的,举个例子,在CommonfindFragment
中:
//初始化数据
private void initData() {
String name = getArguments().getString("name");//分类名称
int position = getArguments().getInt("position");
Log.i("====rank", position + "-----" + RANK[position]);
String rank = RANK[position];
String encode = URLEncoder.encode(name);//必须将中文进行URL编码才能加到接口中
String url = String.format(HttpAdress.FIND_DETAIL, encode, rank);//请求地址
downloadData(url);
}
/**
* 下载网络数据
*
* @param url 网络请求地址
*/
private void downloadData(String url) {
RequestQueue requestQueue = Volley.newRequestQueue(getContext());
//下载json数据
StringRequest request = new StringRequest(url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
parseJson(response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
});
requestQueue.add(request);
requestQueue.start();
}
//设置适配器
private void setAdapter(List<FindDetailEntity.ItemListEntity> data) {
//实例化适配器
adapter = new CommonAdapter<FindDetailEntity.ItemListEntity>(getContext(), data, R.layout.list_home_vedio_item) {
@Override
public void convert(ViewHolder viewHolder, FindDetailEntity.ItemListEntity itemListEntity) {
viewHolder.setText(R.id.tv_title, itemListEntity.getData().getTitle());
//获取时间
int duration = itemListEntity.getData().getDuration();
int mm = duration / 60;//分
int ss = duration % 60;//秒
String second = "";//秒
String minute = "";//分
if (ss < 10) {
second = "0" + String.valueOf(ss);
} else {
second = String.valueOf(ss);
}
if (mm < 10) {
minute = "0" + String.valueOf(mm);
} else {
minute = String.valueOf(mm);//分钟
}
viewHolder.setText(R.id.tv_time, "#" + itemListEntity.getData().getCategory() + " / " + minute + "'" + second + '"');
viewHolder.setImageResourcewithFresco(R.id.iv, Uri.parse(itemListEntity.getData().getCover().getFeed()));
}
};
findListview.setAdapter(adapter);
if (adapter!=null){
adapter.notifyDataSetChanged();
}
}
//解析数据
private void parseJson(String response) {
FindDetailEntity entity = new Gson().fromJson(response, FindDetailEntity.class);
itemListEntities.addAll(entity.getItemList());
isLoad = false;//数据下载完之后设置为false
nextPageUrl = entity.getNextPageUrl();
//如果下一页数据的请求地址为null,则加载底部布局
if (nextPageUrl==null){
findListview.addFooterView(footview, null, false);
}
//设置适配器
setAdapter(itemListEntities);
}
这上面的一段代码,有设置M的(Volley获取数据),有V的(设置adapter显示数据),有C的(组织数据显示)。
所以,请问,您是如何认为您的项目是实用MVC结构的?
我找了两个flv格式的视频,一个正常播放,一个报错了,但是在其他播放器里可以正常播放,报错如下A/libc: Fatal signal 11 (SIGSEGV) at 0x7e238000 (code=1), thread 1034,可以解决吗?谢谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.