Merge Eclipse Project to AS for error: loader dalvik.system.PathClassLoader

在将Eclipse项目迁移到Android Studio的过程中遇到java.lang.ClassNotFoundException错误。通过更换更高版本的操作系统,问题得以解决。
把Eclipse的项目移至AS, 遇到了这样的错误


java.lang.ClassNotFoundException: com.xx.xx.xxx.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.lb.enduser.android-1.apk]


在stackoverflow里面类似的

[url]http://stackoverflow.com/questions/13816961/java-lang-classnotfoundexception-in-loader-dalvik-system-pathclassloader-at-app[/url]

我的问题解决办法是:开始使用三星的版本11的设备在测试,怎么也装不上去

后来换了一个高版本的设备4.2的就可以了,看来应该是低版本兼容高版本有问题
jiwei.xu@334ebc848f07:~/work/beiqi/sources/meta-invo$ git push origin HEAD:refs/for/yocto-invo-AD24APA01_iros_V1-dev Enumerating objects: 11, done. Counting objects: 100% (11/11), done. Delta compression using up to 80 threads Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 964 bytes | 964.00 KiB/s, done. Total 6 (delta 4), reused 0 (delta 0) remote: Resolving deltas: 100% (4/4) remote: Processing changes: refs: 1, done remote: ERROR: Implicit Merge of b1563eb Revert "Summary:[feat][invo-image] modify bb files, add idrive build" remote: ERROR: Implicit Merge of 2225b39 Summary:Version:S020.033 remote: ERROR: Implicit Merge of 4561063 Summary:Version:S020.034 remote: ERROR: Implicit Merge of 25ceb19 Summary: Version:S020.035 remote: ERROR: Implicit Merge of baf1c17 Summary: Version:S020.036 remote: ERROR: Implicit Merge of b38c744 Summary: Version S020.037 remote: ERROR: Implicit Merge of a23ea48 Summary: Version:S020.038 remote: ERROR: Implicit Merge of 7bdcd0b Summary:Version:S010.039 remote: ERROR: Implicit Merge of 366d7d7 Summary: Version S020.040 remote: ERROR: Implicit Merge of 69db7ab Summary:Version:S010.041 remote: ERROR: Implicit Merge of 0ce8297 Summary:Version:S010.042 remote: ERROR: Implicit Merge of eba753c Summary: Version S020.043 remote: ERROR: Implicit Merge of 55b17b9 Summary:Version:S020.044 remote: ERROR: Implicit Merge of e75528b Summary:Version:S020.045 remote: ERROR: Implicit Merge of f44b6f7 Summary:Version:S020.046 remote: ERROR: Implicit Merge of f10f06e Summary:Version:S020.047 remote: ERROR: Implicit Merge of 06cfc88 Summary:Version:S020.048 remote: ERROR: Implicit Merge of aac942a Summary:Version:S020.049 remote: ERROR: Implicit Merge of ff2b0e0 Summary:Version: S020.050 remote: ERROR: Implicit Merge of e212074 Summary:Version:S020.051 remote: ERROR: Implicit Merge of 915ca52 Summary:Version:S020.052 remote: ERROR: Implicit Merge of 0962be9 Summary:Version:S020.053 remote: ERROR: Implicit Merge of babb994 Summary:[feat][udev] trimming udev rules remote: ERROR: Implicit Merge of 543e984 Summary:Version:S020.054 remote: ERROR: Implicit Merge of 991ff5e Summary:[tmp] Close usless app remote: ERROR: Implicit Merge of d9e81ce Revert "Summary:[tmp] Close usless app" remote: ERROR: Implicit Merge of f0cf83e Summary: [feat][invo_app_capture] 更新版本号 OtherInfo:Version:S020.055 remote: ERROR: Implicit Merge of 24460ec Summary: [feat][invo_app_capture] 更新版本号 OtherInfo:Version:S020.056 remote: ERROR: Implicit Merge of b23cf11 Summary:Version:S020.057 remote: ERROR: Implicit Merge of 8b0a688 Merge "Revert "Summary:[tmp] Close usless app"" into yocto-invo-AD24APA01-dev remote: ERROR: Implicit Merge of 230f2ae Summary:[feat][tools] update log dir remote: ERROR: Implicit Merge of 5b48dd5 Summary:Version:S030.058 remote: ERROR: Implicit Merge of d66e2b5 Summary:Modify version remote: ERROR: Implicit Merge of 92c0a1c Summary: Version: S030.059 remote: ERROR: Implicit Merge of 08eb841 Summary:Version:S030.060 remote: ERROR: Implicit Merge of 568942f Summary: Version:S030.061 remote: ERROR: Implicit Merge of 80a3970 Summary: Version:S030.062 remote: ERROR: Implicit Merge of 6f2fe22 Summary:Version:S030.063 To ssh://10.2.90.253:29418/tda4-sdk-yocto/invo-repos/meta-invo.git ! [remote rejected] HEAD -> refs/for/yocto-invo-AD24APA01_iros_V1-dev (implicit merges detected) error: failed to push some refs to 'ssh://jiwei.xu@10.2.90.253:29418/tda4-sdk-yocto/invo-repos/meta-invo.git' 这是什么错误
最新发布
07-30
<think>首先,用户的问题是:“Git push rejected due to implicit merges error explanation and fix”。这看起来是关于Git推送失败的错误,具体是“Implicit Merge”被拒绝。 用户提供了引用[^1],内容是关于Git推送失败的错误信息:"[rejected] master -> master (fetch first) error: failed to push some refs to...",并提示需要先集成远程更改(如'git pull')。 用户说:“上述引用仅供参考,并不是用户真正的需求”,意思是这个引用只是背景信息,用户真正想知道的是“Implicit Merge”错误的原因和修复方法。 所以,我需要解释Git推送被拒绝的原因,特别是由于“Implicit Merge”错误,并提供修复方法。 关键点是“Implicit Merge”。在Git中,“Implicit Merge”可能指的是在推送时,Git尝试自动合并分支,但失败了,导致推送被拒绝。这通常与分支历史不一致有关。 常见的原因: - 远程分支有新的提交,而本地分支没有这些提交。 - 当尝试推送时,Git检测到本地分支和远程分支的历史不同,需要先合并或拉取。 错误信息通常建议使用'git pull'来集成远程更改。 修复步骤: 1. 执行'git pull'来拉取远程更改。 2. 如果有冲突,解决冲突。 3. 然后再次尝试'git push'。 有时,如果不想合并,可以使用'git pull --rebase'来变基本地提交。 用户提到“Implicit Merge”,这可能是一个特定错误消息中的术语。在Git文档中,标准错误是“Updates were rejected because the remote contains work that you do not have locally.”,但它可能隐含地涉及合并。 现在,回答结构: - 系统级指令要求: - 所有行内数学表达式用$...$(但这里可能不涉及数学)。 - 独立公式用$$...$$(不适用)。 - LaTeX语法正确(在文本中,确保任何数学格式正确,但这里可能没有)。 - 使用中文回答。 - 生成相关问题。 - 在引用的段落末尾添加引用标识,如[^1]。用户提供了引用[^1],我应该引用它。 用户说:“上述引用仅供参考”,所以我需要基于一般知识回答,但可以提及引用作为背景。 回答结构: 1. 解释错误原因。 2. 提供修复方法。 3. 生成相关问题。 最后,添加相关问题。 用中文回答。 大纲: 1. **解释错误原因**:描述为什么Git推送被拒绝,特别是由于“Implicit Merge”。 - 远程仓库有更新,本地没有。 - Git在推送时尝试隐式合并,但失败。 - 引用用户提供的错误信息。 2. **修复方法**: - 步骤1: 使用'git pull'拉取远程更改。 - 步骤2: 解决任何合并冲突。 - 步骤3: 提交更改。 - 步骤4: 再次推送。 - 可选:使用'git pull --rebase'避免不必要的合并提交。 3. **生成相关问题**:基于此主题。 确保回答真实可靠:基于Git的常见实践。</think>### Git推送被拒绝:Implicit Merge错误解释与修复 当您在使用Git时遇到推送被拒绝的错误,提示“Implicit Merge”被拒绝,这通常是因为本地分支和远程分支的历史不一致。Git在推送时会尝试自动合并(即“隐式合并”),但如果远程分支有新的提交而本地没有,Git无法安全完成合并,从而拒绝推送。这种错误常见于多人协作项目中,其他开发者可能已向远程仓库推送了更改。以下是详细的解释和修复步骤。 #### 错误原因解释 在Git中,推送操作要求本地分支与远程分支的历史保持一致。如果远程分支领先于本地分支(例如,其他成员提交了代码),Git会尝试执行一个“隐式合并”来整合更改。但由于本地缺少这些更新,合并过程失败,Git会抛出错误。错误消息通常类似于: ``` ! [rejected] master -> master (fetch first) error: failed to push some refs to 'ssh://xx.git' hint: Updates were rejected because the remote contains work that you do not have locally. hint: This is usually caused by another repository pushing to the same ref. hint: You may want to first integrate the remote changes (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. ``` 这里的“Implicit Merge”指的是Git自动触发的合并逻辑,当它检测到分支历史分歧时,会尝试在后台合并,但失败导致推送拒绝。核心原因包括: - **远程有更新,本地未同步**:远程仓库(如GitHub或GitLab)有新的提交,但本地仓库未通过`git pull`或`git fetch`获取这些更改。 - **历史冲突**:本地提交和远程提交修改了相同文件,Git无法自动解决差异。 - **安全机制**:Git拒绝覆盖远程历史,以防止数据丢失,这符合Git的分布式版本控制原则[^1]。 #### 修复方法 解决此错误的关键是先集成远程更改到本地分支,然后再推送。以下是逐步操作指南(假设您当前在`master`分支,如果使用其他分支,请替换为相应分支名): 1. **拉取远程更改并合并**: - 执行`git pull`命令来拉取远程更新并自动合并到本地分支: ```bash git pull origin master # 如果远程分支是master ``` - 如果拉取成功,Git会完成合并。您可能需要解决合并冲突(如果有)。 - **解决冲突**:如果`git pull`报告冲突(如`CONFLICT (content)`),手动编辑冲突文件,然后使用`git add <file>`标记解决,最后提交: ```bash git add . # 添加所有解决后的文件 git commit -m "解决合并冲突" ``` 2. **可选:使用变基代替合并(避免额外提交)**: - 如果您想保持提交历史线性,避免多余的合并提交,可以使用`git pull --rebase`: ```bash git pull --rebase origin master ``` - 变基会将本地提交“重放”在远程更新之上,减少历史分支。如果冲突,解决后使用`git rebase --continue`。 3. **重新推送更改**: - 完成上述步骤后,再次尝试推送: ```bash git push origin master ``` - 此时,本地和远程历史已同步,推送应成功。 **注意事项**: - **预防措施**:在推送前,养成先运行`git pull`的习惯,尤其是在团队协作中。 - **错误处理**:如果`git pull`失败,确保远程仓库URL正确(使用`git remote -v`检查),并验证网络连接。 - **高级选项**:如果推送被拒且您确定需要强制覆盖(慎用,可能导致数据丢失),可使用`git push --force`,但仅推荐在私有分支或紧急情况下使用。 此方法基于Git的标准工作流,能有效解决“Implicit Merge”错误[^1]。 ### 相关问题 1. 如何避免Git推送冲突在团队协作中? 2. Git合并(merge)和变基(rebase)有什么区别和适用场景? 3. 当Git拉取(pull)时出现冲突,如何高效解决?
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值