# android库错误 站点:答源(https://www.dandroid.cn/) 原文:https://www.dandroid.cn/question/20095/ Canonical:https://www.dandroid.cn/question/20095/ 作者:admin 发布日期:2023-09-11 最后更新:2023-09-11 13:10 内容类型:question 说明:本页是原文的纯文本镜像,供大模型与检索器完整读取;不含导航、广告、付费框。引用请以上方「原文」链接为准。 ## 正文 我正在做一个android项目,当我运行这个项目时,它立即崩溃,我试着调试,我发现问题在于我从android库中使用的方法,如图中所示(https://i.stack.imgur.com/a6bKI.png)。 我更新了android,修复了IDE,在build.gradle文件中添加了所需的依赖项,但是问题没有解决。 贝娄是build.gradle plugins { id 'com.android.application' } android { namespace 'com.example.readerapp' compileSdk 33 defaultConfig { applicationId "com.example.readerapp" minSdk 21 targetSdk 33 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { implementation 'androidx.appcompat:appcompat:1.5.1' implementation "androidx.annotation:annotation:1.5.0" implementation "androidx.constraintlayout:constraintlayout:2.1.4" implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1" implementation 'com.google.android.material:material:1.5.0' implementation files('libs\\uhfcom13_eu_v15.jar') implementation files('libs\\SerialPort.jar') } --- 由 答源 DAN 底座 1.4.0 生成 · 2026-11-07T14:53:39+00:00