gpt4 book ai didi

android - React Native Activity 类不存在

转载 作者:太空狗 更新时间:2023-10-29 14:53:50 24 4
gpt4 key购买 nike

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.+'
}

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

昨天它起作用了(应用程序打开时出现白屏,但仍然起作用)但我不知道同时发生了什么。

L.e.:对不起,我忘了写错误:)

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.

我是 React Native 的新手,我不知道该怎么做。

L.e. 2:该项目是来自react-native android命令的init项目。没有添加任何内容。

最佳答案

如果您确定您的 AndroidManifest.xml 和 build.gradle 文件没有任何问题,请在终端上运行以下命令:

adb uninstall <package_name>

关于android - React Native Activity 类不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33036587/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com