RN与android原生开发混合后的环境报错问题
需要先安装nodejs
$ yarn --version1.12.1更新当前版本yarn upgrade --latest安装 | Yarn================到对应目录下用git bash here执行:yarn================yarn startnpm install================rn混合后编译卡的问题,到D:\exchangespace目录下,cmd执行下面命令打包到D:\exchangespace\android\app\src\main\assets里面直接使用,只有rn的代码更新了才需要重新打包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\=================有时候构建Android studio项目,会莫名出现
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.Error:resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found的问题,并且还会引起一系列其他的问题。修改方法:将compileSdkVersion修改成25,并将对应的buildToolsVersion修改成25.0.2=================
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.htmlConfiguration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.htmlConfiguration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.htmldependencies {
compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.facebook.react:react-native:+'}dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.facebook.react:react-native:+'}------------compile --> implementationtestCompile --> testImplementationtestApi --> testImplementationprovided --> compileOnly======================不同严重程度可以按以下三种处理:1.切换到project视图,删除.grade .idea 文件夹,clean project,2.关闭android,重新打开编译3.彻底清除缓存 File -> Invalidate Caches / Restart... (会清理掉本地修改的Gradle配置)======================Quit emulatorQuit Android StudioReopen Android StudioBuild > Clean ProjectRun/debug your app onto your device/emulator again======================