AhC*_*g11 2 node.js npm react-native
AAPT:错误:资源 android:未找到 attr/IStar。
这个错误突然发生,上周还正常。
我尝试了很多解决方案,但没有一个有效。尝试过的解决方案:
npm install./gradlew clean在 /android中清理 gradlenpm cache clean --forceorg.gradle.jvmargs=-Xmx4608m到/android/gradle.propertiesext{}添加androidXCore = "1.6.0"npm update @react-native-community/netinfo版本:
"react-native": "0.63.4",
compileSdkVersion = 29
targetSdkVersion = 29
Run Code Online (Sandbox Code Playgroud)
将其添加到您的android/buld.gradle文件中。
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
allprojects {
configurations.all {
resolutionStrategy {
// Remove this override in 0.65+, as a proper fix is included in react-native itself.
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}
Run Code Online (Sandbox Code Playgroud)
参考: https: //github.com/facebook/react-native/issues/35210
| 归档时间: |
|
| 查看次数: |
11201 次 |
| 最近记录: |