React Native 活动类不存在

Mat*_*tei 5 android react-native

build.gradle 文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.fish"
    minSdkVersion 16
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.facebook.react:react-native:0.12.+'
}
Run Code Online (Sandbox Code Playgroud)

我尝试了很多方法来解决这个问题,但似乎没有任何效果。也许有人也遇到了这个错误。我正在使用节点稳定版 (4.0.0)。

昨天它有效(该应用程序以白屏打开,但仍然有效)但我不知道同时发生了什么。

Le:对不起,我忘记写错误了:)

Starting the app (/Users/matei/Library/Android/sdk//platform-tools/adb shell am start -n com.fish/.MainActivity)...
Starting: Intent { cmp=com.fish/.MainActivity }
Error type 3
Error: Activity class {com.fish/com.fish.MainActivity} does not exist.
Run Code Online (Sandbox Code Playgroud)

我是本机反应的新手,我不知道该怎么做。

Le 2:该项目是来自 react-native android 命令的 init 项目。什么都没有添加。

小智 1

为了这个问题我花了一天时间。

最后我解决了。

如果您遇到此问题,请检查该应用程序是否已完全删除。

您可以转到“设置”菜单,然后转到“应用程序”并检查应用程序是否已删除。