【问题标题】:react-native deploy to android device error 3 activity class does not existreact-native deploy to android device error 3 活动类不存在
【发布时间】: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 应用程序有关,但是给出的解决方案要么不相关,要么没有帮助(或者我不理解它们)

【问题讨论】:

标签: java android react-native


【解决方案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.gradleAndroidManifest.xml 文件位于何处?
  • @ArchNoob build.gradle- ${projectFolder}\android\app。 AndroidManifest.xml- ${projectFolder}\android\app\src\main
猜你喜欢
  • 2022-11-19
  • 2016-01-07
  • 1970-01-01
  • 1970-01-01
  • 2011-11-22
  • 2018-11-25
  • 1970-01-01
  • 2021-04-05
  • 2017-01-10
相关资源
最近更新 更多