![](/img/trans.png)
[英]When I build project in Android Studio it throws an error of com.payumoney.sdkui.ui.utils does not exist
[英]Error type 3. Activity class {com.project/ com.project.MainActivity} does not exist in react native (Visual studio EMulator for Android)
我是React-Native的新手。
我試圖在Visual Studio Emulator for Android中運行我的React-Native android項目。
通過運行react-native run-android
,我的構建成功完成,但是我無法在模擬器中啟動該應用程序。
它給了我下面的錯誤:
錯誤類型3。活動類不存在。
我嘗試了gradlew clean和gradlew cleanBuildCache。 但存在相同的錯誤。
我檢查了以下文件中的包名稱,所有4個文件中的包名稱都相同.MainActivity.java,AndroidManifest.xml,build.gradle,MainApplication.java
難道我做錯了什么? 或者如何在Visual Studio模擬器中運行我的應用程序?
您是否在AndroidStudio中打開了您的項目? 在其中打開后,檢查App-> src-> main-> assets中的assets文件夾(如果不存在)。
運行以下命令
$ react-native bundle –platform android –dev false –entry-file index.js –bundle-output android/app/src/main/assets/index.android.bundle –assets-dest android/app/src/main/res
然后再次嘗試構建並運行它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.