重命名模塊

使用的時候就可以使用@代替js文件夾了;
import Image from '@/common/components/CustomImage';
android添加native module需要在mainapplication getPackages添加
Q:couldn't find "libjpush218.so"
A:打包的時候并沒有在libs中復(fù)制SO庫到項目中。因此我們需要在build.gradle中告訴打包工具執(zhí)行復(fù)制so庫文件。
android {
...
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDirs = ['libs']
}
}
}
Q:調(diào)試打包的apk(install the signed apk onto your device)
A:$ react-native run-android --variant=releasewill
Q:/Users/zhangshuai/meteor/tagt/android/app/src/main/res/values/strings.xml:4: Error: "facebook_app_id" is not translated in "en" (English), "zh" (Chinese) [MissingTranslation]
A: 添加translatable屬性name="facebook_app_id" translatable="false"
react重大事件:
React.createClassis now available as create-react-class,React.PropTypesas prop-types,React.DOMas react-dom-factories, react-addons-test-utils as react-dom/test-utils, and shallow renderer as react-test-renderer/shallow
更新慎重了,react在9.26之后徹底取締React.createClass代替為create-react-class包
Q:com.android.dex.DexIndexOverflowException
A: 添加com.android.support:multidex?
Q:Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
A:dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
preDexLibraries false //delete the already predexed libraries
}
Q:Plugin with id 'com.github.dcendents.android-maven' not found.
A:buil.gradle中dependencies中添加
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
Q:NDK is missing a "platforms" directory.
A試著更換android/build.gradle的版本
Q:Plugin with id 'com.jfrog.bintray' not found.
A:classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
gradle android加載本地sdk配置
// 加載本地配置
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven"? //發(fā)布到Bintray的哪個倉庫里,就是在注冊時新建倉庫的名字
name = "ncalendar"? //在倉庫中顯示的項目名字
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}
Bridging-Header.h swift 與 object c混編
Xcode6之后不能自動引入的UIKit、Foundation的解決方法,以前可以不使用import就可以直接使用頭文件中的內(nèi)容
Q:升級0.49后以前0.45的pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
報錯:The name of the given podspec `yoga` doesn't match the expected one `Yoga`
A:升級后模塊名稱Yoga變?yōu)樾懙牧藋oga

xcode 屏蔽OS_ACTIVITY_MODE log OS_ACTIVITY_MODE = disable
XMLHttpRequest: status ==0,_response:
The resource could not be loaded because the App Transport Security policy requires the use of a sec
Installation Failed: Invalid Argument -iOS
你真的知道react-native版本是如何更新的嗎?
react-native 與 react , expo版本對應(yīng)關(guān)系
ref返回Null錯誤使用ref情況:


react-native canvas(webview) 卡屏嚴重(徹底放棄webview中使用)

react-native meteor 結(jié)合的教學(xué)老師
http 請求 json 或者 xml 或者 websocket
Unrecognized Font Family 'Material Icons'
使用react-native-fetch-blob提示cannot read property 'DocumentDir‘ of
ios http TypeError: Network request failed
View.propTypes 在44后的正確使用方法 ViewPropTypes
加載本地圖片時報Unexcepted character,關(guān)掉npm啟動的命令行,重新運行,不要再模擬器中啟動hot reload
Unrecognized font family 'FontAwesome' 解決方法:react-native link react-native-vector-icons
Cannot read property 'getPhotos' of undefined
React Native入坑之fetch() Network Request Failed
react-native 默認使用iphone 6 可以通過--simulator指定模擬器
connect方法生成容器組件以后,需要讓容器組件拿到state對象,才能生成 UI 組件的參數(shù)
Reducer 在異步操作結(jié)束后自動執(zhí)行 . 中間件(middleware)
Store 收到 Action 以后,必須給出一個新的 State,這樣 View 才會發(fā)生變化
redux 入門:store、reducer、action關(guān)聯(lián)
/react-native-navigation/ api詳解
app調(diào)用微信等第三方平臺,在info.plist文件中加LSApplicationQueriesSchemes,數(shù)組形式,把需要跳轉(zhuǎn)的平臺加上
target -> build setting -> header search path 決定了后面在 appdelegate中導(dǎo)入內(nèi)容的搜索路徑
ReactNative : ignoring return value of function declared with warn_unused_result attribute
__nw_connection_get_connected_socket_block_invoke Connection has no connected handler
錯誤: 找不到符號 return BuildConfig.DEBUG;
android --> build.gradle ependencies { provided 'com.facebook.react:react-native:0.+' }
需要配置xcode的react-native 模塊