Я новичок в том, чтобы отреагировать Native, и я хочу монетизировать свое приложение, поэтому я интегрирую команду Admob in React Native, я создал свое приложение, используя NPX Create-react-cnative-app , я попытался увидеть YouTube, Google, Chatgpt, Bard, но ничего не работает, и это моя последняя надежда, пожалуйста, помогите мне, это мой код,
prard. alt = "Введите описание изображения здесь" src = "https://i.sstatic.net/uonzr.png"/>
copybase.js --- Файл, в котором я тестирую свои объявления, но ничто не появилось за последние 2 дня
import { Animated, Dimensions, Image, Pressable, StyleSheet, Text, View } from 'react-native';
import React, { useRef } from 'react';
import Header from '../components/Header';
import { useThContext } from '../reducon/context';
import { Linking } from 'react-native';
import { BannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads';
const adUnitId = __DEV__ ? TestIds.BANNER : 'ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx';
export default Copybase = ({ navigation }) => {
const animation = useRef(new Animated.Value(1)).current;
const bgColor = useRef(new Animated.Value(0)).current;
const handlePressIn = () => {
Animated.spring(animation, {
toValue: 0.97,
duration: 200,
useNativeDriver: true,
}).start();
Animated.timing(bgColor, {
toValue: 1,
duration: 200,
useNativeDriver: true,
}).start();
}
const handlePressOut = () => {
Animated.spring(animation, {
toValue: 1,
duration: 200,
useNativeDriver: true,
}).start();
Animated.timing(bgColor, {
toValue: 0,
duration: 200,
useNativeDriver: true,
}).start();
Linking.openURL(info.link);
}
const { info } = useThContext();
const backgroundColor = bgColor.interpolate({
inputRange: [0, 1],
outputRange: ['#749b38', '#648630'],
})
return (
{ handlePressIn() }} onPressOut={() => { handlePressOut() }}>
COPY LAYOUT
)
}
const styles = StyleSheet.create({
container: {
height: '100%',
alignItems: 'center',
backgroundColor: '#f9f9f9',
},
image: {
width: Dimensions.get('window').width,
height: 300,
resizeMode: 'contain',
},
copyButton: {
marginTop: 40,
backgroundColor: '#749b38',
padding: 12,
borderRadius: 3,
shadowColor: "#000000",
shadowOffset: {
width: 0,
height: 1,
},
shadowOpacity: 0.16,
shadowRadius: 1.51,
elevation: 6,
},
copyButtonText: {
color: '#fff',
fontWeight: '700',
fontSize: 18,
}
});
< /code>
Ошибка, с которой я сталкиваюсь ---- < /p>
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleMobileAdsModule' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:null in handleError
at node_modules\expo\build\errors\ExpoErrorManager.js:null in createErrorHandler
at node_modules\expo\build\errors\ExpoErrorManager.js:null in
at node_modules\@react-native\js-polyfills\error-guard.js:null in ErrorUtils.applyWithGuard
at node_modules\metro-runtime\src\polyfills\require.js:null in guardedLoadModule
at http://192.168.29.76:19000/index.bundle ... false:null in metroRequire
at http://192.168.29.76:19000/index.bundle ... false:null in global
Подробнее здесь: https://stackoverflow.com/questions/767 ... obileadsmo
Инвариантное нарушение: Turbomoduleregistry.getenforcing (...): 'rngooglemobileadsmodule', в React Native при интеграции ⇐ Android
Форум для тех, кто программирует под Android
1750415583
Anonymous
Я новичок в том, чтобы отреагировать Native, и я хочу монетизировать свое приложение, поэтому я интегрирую команду Admob in React Native, я создал свое приложение, используя NPX Create-react-cnative-app , я попытался увидеть YouTube, Google, Chatgpt, Bard, но ничего не работает, и это моя последняя надежда, пожалуйста, помогите мне, это мой код,
prard. alt = "Введите описание изображения здесь" src = "https://i.sstatic.net/uonzr.png"/>
copybase.js --- Файл, в котором я тестирую свои объявления, но ничто не появилось за последние 2 дня
import { Animated, Dimensions, Image, Pressable, StyleSheet, Text, View } from 'react-native';
import React, { useRef } from 'react';
import Header from '../components/Header';
import { useThContext } from '../reducon/context';
import { Linking } from 'react-native';
import { BannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads';
const adUnitId = __DEV__ ? TestIds.BANNER : 'ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx';
export default Copybase = ({ navigation }) => {
const animation = useRef(new Animated.Value(1)).current;
const bgColor = useRef(new Animated.Value(0)).current;
const handlePressIn = () => {
Animated.spring(animation, {
toValue: 0.97,
duration: 200,
useNativeDriver: true,
}).start();
Animated.timing(bgColor, {
toValue: 1,
duration: 200,
useNativeDriver: true,
}).start();
}
const handlePressOut = () => {
Animated.spring(animation, {
toValue: 1,
duration: 200,
useNativeDriver: true,
}).start();
Animated.timing(bgColor, {
toValue: 0,
duration: 200,
useNativeDriver: true,
}).start();
Linking.openURL(info.link);
}
const { info } = useThContext();
const backgroundColor = bgColor.interpolate({
inputRange: [0, 1],
outputRange: ['#749b38', '#648630'],
})
return (
{ handlePressIn() }} onPressOut={() => { handlePressOut() }}>
COPY LAYOUT
)
}
const styles = StyleSheet.create({
container: {
height: '100%',
alignItems: 'center',
backgroundColor: '#f9f9f9',
},
image: {
width: Dimensions.get('window').width,
height: 300,
resizeMode: 'contain',
},
copyButton: {
marginTop: 40,
backgroundColor: '#749b38',
padding: 12,
borderRadius: 3,
shadowColor: "#000000",
shadowOffset: {
width: 0,
height: 1,
},
shadowOpacity: 0.16,
shadowRadius: 1.51,
elevation: 6,
},
copyButtonText: {
color: '#fff',
fontWeight: '700',
fontSize: 18,
}
});
< /code>
Ошибка, с которой я сталкиваюсь ---- < /p>
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleMobileAdsModule' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:null in handleError
at node_modules\expo\build\errors\ExpoErrorManager.js:null in createErrorHandler
at node_modules\expo\build\errors\ExpoErrorManager.js:null in
at node_modules\@react-native\js-polyfills\error-guard.js:null in ErrorUtils.applyWithGuard
at node_modules\metro-runtime\src\polyfills\require.js:null in guardedLoadModule
at http://192.168.29.76:19000/index.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:null in metroRequire
at http://192.168.29.76:19000/index.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:null in global
Подробнее здесь: [url]https://stackoverflow.com/questions/76793698/invariant-violation-turbomoduleregistry-getenforcing-rngooglemobileadsmo[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия