AndroidManifest.xml MainActivity, was not found in the project or the libraries

文章讨论了一个在Android开发中常见的问题,即在manifest文件中引用的MainActivity类无法在项目或库中找到。解决方案是将MainActivity的引用更改为正确的包名路径,即com.example.mytvwebview.MainActivity,这解决了找不到MainActivity的未解析类错误。

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

Class referenced in the manifest, com.example.webview.MainActivity, was not found in the project or the libraries
Unresolved class ‘MainActivity’

在这里插入图片描述
.MainActivity 改为 com.example.mytvwebview.MainActivity

现在出现如下错误: AndroidManifest.xml文件的错误: 错误处代码:android:name=".MyApplication" 错误信息:Class referenced in the manifest, `com.example.floatingsearchapp.MyApplication`, was not found in the project or the libraries 错误信息:Unresolved class 'MyApplication' 错误处代码:<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> 错误信息:READ_EXTERNAL_STORAGE is deprecated (and is not granted) when targeting Android 13+. If you need to query or interact with MediaStore or media files on the shared storage, you should instead use one or more new storage permissions: `READ_MEDIA_IMAGES`, `READ_MEDIA_VIDEO` or `READ_MEDIA_AUDIO`. 错误处代码:<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 错误信息:WRITE_EXTERNAL_STORAGE is deprecated (and is not granted) when targeting Android 13+. If you need to write to shared storage, use the `MediaStore.createWriteRequest` intent. MainActivity.kt文件的错误: 错误处代码:startActivityForResult(intent, 100) 错误信息:<html>'startActivityForResult(Intent, Int): Unit' is deprecated. This method has been deprecated in favor of using the Activity Result API<br/>which brings increased type safety via an {@link ActivityResultContract} and the prebuilt<br/>contracts for common intents available in<br/>{@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for<br/>testing, and allow receiving results in separate, testable classes independent from your<br/>activity. Use<br/>{@link #registerForActivityResult(ActivityResultContract, ActivityResultCallback)}<br/>passing in a {@link StartActivityForResult} object for the {@link ActivityResultContract}.
06-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值