Error type 3 真机调试,项目卸载掉,想重新安装的时出现错误

本文详细介绍了当遇到Android应用安装失败,提示“Errortype3”及“Activity class不存在”等错误时的解决方法。通过使用adb命令卸载冲突的apk,可以有效解决安装问题,恢复正常安装流程。

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

Error type 3
Error: Activity class {com.honeywell.honeywellproject/com.honeywell.honeywellproject.InitWellComeModule.WellcomePage.WellcomeActivity} does not exist.

Error while Launching activity

解决方法:使用命令adb uninstall com.xx.xxx.xxx(包名),卸载掉apk就可以重新正常安装了。

我在expo沙盒环境中创建了reactnative项目,写了一个微信登录页面为import { View, Text, SafeAreaView, TouchableOpacity, Alert, Linking, StyleSheet } from &#39;react-native&#39; import React, { useEffect } from &#39;react&#39; const Login = () => { const handleWeChatLogin = async () => { try { // 检查是否安装了微信 const isWXInstalled = await Linking.canOpenURL(&#39;weixin://&#39;) if (!isWXInstalled) { Alert.alert(&#39;提示&#39;, &#39;请先安装微信&#39;) return } // 构建微信登录 URL const appId = &#39;wxc063640eb0fd5cce&#39; const redirectUri = encodeURIComponent(&#39;myapp://login&#39;) const scope = &#39;snsapi_userinfo&#39; const state = Math.random().toString(36).substring(7) const wxUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirectUri}&response_type=code&scope=${scope}&state=${state}#wechat_redirect` console.log(&#39;微信登录跳转路径:&#39;, wxUrl) // 打开微信应用 await Linking.openURL(&#39;weixin://&#39;) // 监听URL变化 Linking.addEventListener(&#39;url&#39;, handleUrl) } catch (error) { console.error(&#39;微信登录失败:&#39;, error) Alert.alert(&#39;错误&#39;, &#39;微信登录失败,请重试&#39;) } } const handleUrl = async (event: { url: string }) => { try { const { url } = event if (url.includes(&#39;code=&#39;)) { // 解析授权码 const code = url.split(&#39;code=&#39;)[1].split(&#39;&&#39;)[0] console.log(&#39;微信授权成功,code:&#39;, code) Alert.alert(&#39;成功&#39;, &#39;微信登录成功!&#39;) // 这里可以发送 code 到后端服务器换取用户信息 // const response = await fetch(&#39;YOUR_BACKEND_URL/wechat/login&#39;, { // method: &#39;POST&#39;, // body: JSON.stringify({ code }), // }) // const userInfo = await response.json() } } catch (error) { console.error(&#39;处理授权结果失败:&#39;, error) Alert.alert(&#39;错误&#39;, &#39;处理授权结果失败,请重试&#39;) } } return ( <SafeAreaView style={styles.container}> <View className=&#39;mt-10&#39;> <Text style={styles.title}>登录页面</Text> <TouchableOpacity style={styles.wechatButton} onPress={handleWeChatLogin} > <Text style={styles.buttonText}>微信登录</Text> </TouchableOpacity> </View> </SafeAreaView> ) } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: &#39;#fff&#39;, }, title: { fontSize: 24, marginBottom: 30, color: &#39;#333&#39;, textAlign: &#39;center&#39; }, wechatButton: { backgroundColor: &#39;#07C160&#39;, paddingHorizontal: 30, paddingVertical: 12, borderRadius: 5, marginHorizontal: 20 }, buttonText: { color: &#39;#fff&#39;, fontSize: 16, fontWeight: &#39;bold&#39;, textAlign: &#39;center&#39; }, }) export default Login现在能够选择微信,跳转至微信页面,但是没有微信授权页面,请解决,要求不能够跳转至浏览器页面
最新发布
04-03
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值