Android原生集成ReactNative 在同一目錄下,進行打包 打包失敗
gradle assembleRelease
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :mzbanner:processReleaseManifest
StudioProjects/duojiaRnAndroid/mzbanner/src/main/AndroidManifest.xml:6:5-11:19 Warning:
application@android:allowBackup was tagged at AndroidManifest.xml:6 to replace other declarations but no other declaration present
> Task :app:bundleReleaseJsAndAssets FAILED
internal/modules/cjs/loader.js:613
throw err;
^
Error: Cannot find module '/StudioProjects/node_modules/react-native/cli.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
at Function.Module._load (internal/modules/cjs/loader.js:526:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:824:10)
at internal/main/run_main_module.js:17:11
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'node'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 41s
24 actionable tasks: 24 executed
根據上面的提示 是位置沒找對 但是得修改組態檔 不知道具體為那個組態檔
uj5u.com熱心網友回復:
rn的依賴沒裝,一般在專案根目錄,也就是StudioProjects目錄下執行npm install 或者 yarnuj5u.com熱心網友回復:
我RN跟原生在同一級目錄下 安卓不是RN下的一個子檔案夾
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/140327.html
標籤:Android
下一篇:安卓客戶端json中文亂碼
