Android studio求助帖

在开发一个基于Android的课程表应用时,开发者遇到一个问题:点击保存按钮后,输入的课程信息未能显示在选中的空白格子上。调试过程中出现错误提示"W/System: ClassLoader referenced unknown path: /data/app/com.example.b-2/lib/arm64"。尝试过网上的解决方案但问题仍未解决。MainActivity.java代码已附上,布局文件包含20个TextView。开发者疑惑是代码问题还是环境问题,使用的是Android Studio 3.3.0版本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

基于Android的课程表,课表主体完成了。功能是点击空白格子处增加课程信息。但是真机调试时点击保存按钮后所输入的课程信息并没有出现在选中的空白格子上,并调试时一直报一个错误W/System: ClassLoader referenced unknown path: /data/app/com.example.b-2/lib/arm64不知道为什么。是这个报错导致没有实现预期功能还是代码存在问题,网上解决办法差不多都试过了,还是无法解决。请各位前辈帮忙看看,非常感谢。附上MainActivity.java的代码
如下:`package com.example.b;

import android.app.Activity;
import android.content.ContentValues;
import android.content.Intent;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends Activity implements View.OnClickListener {

protected DBHelper myDb;
private SQLiteDatabase dbReader,dbWriter;
private Button buttonSet;
protected boolean flag=false;
public TextView tv11,tv12,tv13,tv14,tv15,
        tv21,tv22,tv23,tv24,tv25,
        tv31,tv32,tv33,tv34,tv35,
        tv41,tv42,tv43,tv44,tv45;
//public TextView  txMon,txTus,txWed,txThurs,txFri,txSatur,txSun;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    intiviews();//找到view
    //实例化DB
    myDb=new DBHelper(this);
    dbWriter=myDb.getWritableDatabase();
    dbReader=myDb.getReadableDatabase();
    //第一次App运行初始化数据库
    intailDB();

    setTextListenners();//设置点击事件
    setTextContent();//从SQL读取数据
}
//找到view
private void intiviews(){
    tv11=findViewById(R.id.tv11);
    tv12=findViewById(R.id.tv12);
    tv13=findViewById(R.id.tv13);
    tv14=findViewById(R.id.tv14);
    tv15=findViewById(R.id.tv15);
    tv21=findViewById(R.id.tv21);
    tv22=findViewById(R.id.tv22);
    tv23=findViewById(R.id.tv23);
    tv24=findViewById(R.id.tv24);
    tv25=findViewById(R.id.tv25);
    tv31=findViewById(R.id.tv31);
    tv32=findViewById(R.id.tv32);
    tv33=findViewById(R.id.tv33);
    tv34=findViewById(R.id.tv34);
    tv35=findViewById(R.id.tv35);
    tv41=findViewById(R.id.tv41);
    tv42=findViewById(R.id.tv42);
    tv43=findViewById(R.id.tv43);
    tv44=findViewById(R.id.tv44);
    tv45=findViewById(R.id.tv45);
    buttonSet=fin
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值