android - 出了点问题 android studio 应用程序刚刚退出
问题描述
我现在进行团队项目我从团队获得了更新的文件夹,所以我更改了整个文件夹并启动 Android Emulator App 可以启动,但在第一页退出,没有错误弹出窗口刚刚退出我认为数据库有问题,但我不知道确切地
这是logcat
2021-10-16 22:16:48.514 8409-8409/? I/xample.practic: Not late-enabling -Xcheck:jni (already on)
2021-10-16 22:16:48.531 8409-8409/? I/xample.practic: Unquickening 12 vdex files!
2021-10-16 22:16:48.533 8409-8409/? W/xample.practic: Unexpected CPU variant for X86 using defaults: x86
2021-10-16 22:16:48.853 8409-8409/com.example.practice D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-10-16 22:16:48.853 8409-8409/com.example.practice D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-10-16 22:16:48.889 8409-8433/com.example.practice D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so
2021-10-16 22:16:48.892 8409-8433/com.example.practice D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
2021-10-16 22:16:48.897 8409-8433/com.example.practice D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so
2021-10-16 22:16:49.085 8409-8409/com.example.practice W/xample.practic: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
2021-10-16 22:16:49.086 8409-8409/com.example.practice W/xample.practic: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2021-10-16 22:16:49.319 8409-8409/com.example.practice W/xample.practic: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, reflection, allowed)
2021-10-16 22:16:49.319 8409-8409/com.example.practice W/xample.practic: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, reflection, allowed)
2021-10-16 22:16:49.319 8409-8409/com.example.practice W/xample.practic: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (greylist,core-platform-api, reflection, allowed)
2021-10-16 22:16:49.432 8409-8431/com.example.practice D/HostConnection: HostConnection::get() New Host Connection established 0xed92a400, tid 8431
2021-10-16 22:16:49.437 8409-8431/com.example.practice D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0
2021-10-16 22:16:49.439 8409-8431/com.example.practice W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2021-10-16 22:16:49.449 8409-8431/com.example.practice D/EGL_emulation: eglCreateContext: 0xed92aa20: maj 3 min 0 rcv 3
2021-10-16 22:16:49.472 8409-8431/com.example.practice D/EGL_emulation: eglMakeCurrent: 0xed92aa20: ver 3 0 (tinfo 0xedc76bd0) (first time)
2021-10-16 22:16:49.515 8409-8431/com.example.practice I/Gralloc4: mapper 4.x is not supported
2021-10-16 22:16:49.548 8409-8431/com.example.practice D/HostConnection: createUnique: call
2021-10-16 22:16:49.548 8409-8431/com.example.practice D/HostConnection: HostConnection::get() New Host Connection established 0xed929590, tid 8431
2021-10-16 22:16:49.548 8409-8431/com.example.practice D/goldfish-address-space: allocate: Ask for block of size 0x100
2021-10-16 22:16:49.549 8409-8431/com.example.practice D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f892d000 size 0x2000
2021-10-16 22:16:49.559 8409-8431/com.example.practice D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0
2021-10-16 22:16:49.828 8409-8409/com.example.practice D/CompatibilityChangeReporter: Compat change id reported: 147798919; UID 10153; state: ENABLED
这是主页代码如果您需要更多请告诉我
package com.example.practice.activity;
//메인화면 넘어가기 전 첫 화면 기능 없음.
import...
public class MainActivity extends AppCompatActivity {
// node js
private ServiceApi service;
//
private com.example.practice.event.backPressHandler backPressHandler = new backPressHandler(this);
//
private Button btn_goCoin;
private TextView tv_goCoin;
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.Theme_Practice);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
service = RetrofitClient.getClient().create(ServiceApi.class);
Call<List<ResponseData>> call = service.doGetListResource();
//
btn_goCoin = (Button)findViewById(R.id.btn_goCoin);
btn_goCoin.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
Intent intent = new Intent(MainActivity.this, CoinActivity.class);
startActivity(intent);
}
});
tv_goCoin = (TextView) findViewById(R.id.tv_goCoin);
call.enqueue(new Callback<List<ResponseData>>(){
@Override
public void onResponse(Call<List<ResponseData>> call, Response<List<ResponseData>> response){
Toast.makeText(getApplicationContext(), "Success", Toast.LENGTH_LONG);
List<ResponseData> resource = response.body();
List<ResponseData> dataList = resource;
ArrayList<Integer> NoList = new ArrayList<Integer>();
ArrayList<String> ReviewDateList = new ArrayList<String>();
ArrayList<String> TitleList = new ArrayList<String>();
ArrayList<String> ReviewList = new ArrayList<String>();
ArrayList<Integer> ScoreList = new ArrayList<Integer>();
ArrayList<Integer> PredictList = new ArrayList<Integer>();
int i = 0;
for(ResponseData data : dataList){
NoList.add(i, data.No);
ReviewDateList.add(i, data.Review);
TitleList.add(i, data.Title);
ReviewList.add(i, data.Review);
ScoreList.add(i, data.Score);
PredictList.add(i, data.Predict);
}
Intent intent = new Intent(getApplicationContext(), CoinActivity.class);
intent.putExtra("noList", NoList);
intent.putExtra("reviewDateList", ReviewDateList);
intent.putExtra("titleList", TitleList);
intent.putExtra("reviewList", ReviewList);
intent.putExtra("scoreList", ScoreList);
intent.putExtra("predictList", PredictList);
startActivity(intent);
}
@Override
public void onFailure(Call<List<ResponseData>> call, Throwable t){
Toast.makeText(getApplicationContext(), "Fail", Toast.LENGTH_LONG);
Log.e("Error", t.getMessage());
t.printStackTrace();
call.cancel();
}
});
}
}
解决方案
推荐阅读
- react-native - 与 payFort react-native-expo 集成
- bash - 在 Bash 中编辑文本
- python - 有没有办法可以在 Python 中内部加入两个字典列表?
- python - Python-在contourf图中压缩y轴的下端
- google-cloud-platform - 用于内部认证请求的 Google Cloud Function 403
- excel - VBA在word文档的页脚中查找和替换
- google-sheets - 尝试将 Coinbase Pro API 导入 Google 表格时出现解析错误
- azure-devops - 多配置 Azure Devops 2019 构建管道中的条件管道(Visual Studio 测试)任务
- javascript - 未捕获的类型错误:无法读取 node.js 上未定义的属性“长度”
- c++ - 为什么这不能在 Linux 上运行,但在 OSX 上运行良好?