react-native deploy to android device error 3 活动类不存在
Posted
技术标签:
【中文标题】react-native deploy to android device error 3 活动类不存在【英文标题】:react-native deploy to android device error 3 activity class does not exist 【发布时间】:2016-04-26 07:47:05 【问题描述】:我的应用程序在我的模拟器上运行良好,所以现在我正试图将它放在我的手机上。当我尝试安装时,我收到以下消息
...
BUILD SUCCESSFUL
Total time: 15.578 secs
This build could be faster, please consider using the Gradle Daemon: http://gradle.org/docs/2.4/userguide/gradle_daemon.html
Starting the app (/usr/local/opt/android-sdk/platform-tools/adb shell am start -n com.ethicalfishing/.MainActivity)...
Starting: Intent cmp=com.ethicalfishing/.MainActivity
Error type 3
Error: Activity class com.ethicalfishing/com.ethicalfishing.MainActivity does not exist.
我知道这个错误与非 react-native 应用程序有关,但是给出的解决方案要么不相关,要么没有帮助(或者我不理解它们)
【问题讨论】:
***.com/questions/45061034/… AndroidManifest.xml 文件的位置 【参考方案1】:我遇到了同样的问题。我发现build.gradle的applicationId和AndroidManifest.xml
包不一样。
build.gradle:
defaultConfig
applicationId "com.example.yourapp"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk
abiFilters "armeabi-v7a", "x86"
这就是我的问题。
【讨论】:
build.gradle
和 AndroidManifest.xml
文件位于何处?
@ArchNoob build.gradle
- $projectFolder\android\app。 AndroidManifest.xml
- $projectFolder\android\app\src\main以上是关于react-native deploy to android device error 3 活动类不存在的主要内容,如果未能解决你的问题,请参考以下文章
react-native启动时红屏报错:Unable to load script.Make sure you're either running a metro server or that
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but
Genymotion模拟器拖入文件报An error occured while deploying the file的错误