Форум для тех, кто программирует под Android
-
Anonymous
TypeError: не может прочитать свойство «stylesource» null-mappls-map-react-родной
Сообщение
Anonymous »
При импорте
импорт mapplsgl из 'mappls-map-react-родной'; Приложение
Код: Выделить всё
"react": "18.3.1",
"react-native": "0.77.1",
"mappls-map-react-native": "^1.0.11",
android/build.gradle
Код: Выделить всё
buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}
allprojects {
repositories {
maven { url 'https://maven.mappls.com/repository/mappls/' }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
apply plugin: "com.facebook.react.rootproject"
< /code>
[b]Note: When newArchEnabled=false everything works fine. Issue only with newArchEnabled=true
[/b]
п>
Подробнее здесь:
https://stackoverflow.com/questions/794 ... act-native
1740034880
Anonymous
При импорте [b] импорт mapplsgl из 'mappls-map-react-родной'; [/b] Приложение[code] "react": "18.3.1",
"react-native": "0.77.1",
"mappls-map-react-native": "^1.0.11",
[/code]
android/build.gradle
[code]buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}
allprojects {
repositories {
maven { url 'https://maven.mappls.com/repository/mappls/' }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
apply plugin: "com.facebook.react.rootproject"
< /code>
[b]Note: When newArchEnabled=false everything works fine. Issue only with newArchEnabled=true[/code] [/b]
п>
Подробнее здесь: [url]https://stackoverflow.com/questions/79451902/typeerror-cannot-read-property-stylesource-of-null-mappls-map-react-native[/url]