You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i have an issue after creating a dev build, its done successfully but after the setup of apk it doesnt work, its just flash then stop.
i think this is related to the problem:
WARNING: react-native-google-mobile-ads requires an 'android_app_id' property inside a 'react-native-google-mobile-ads' key in your app.json.
No android_app_id property was found in this location. The native Google Mobile Ads SDK will crash on startup without it.
You can safely ignore this warning if you are using our Expo config plugin.
Platforms
Android, but have not tested behavior on iOS
React Native Info
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Memory: 3.56 GB / 7.92 GB
Binaries:
Node:
version: 20.15.0
path: C:\Program Files\nodejs\node.EXE
Yarn:
version: 1.22.22
path: ~\node_modules\.bin\yarn.CMD
npm:
version: 10.8.3
path: ~\AppData\Roaming\npm\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-241.18034.62.2411.12071903
Visual Studio: Not Found
Languages:
Java:
version: 17.0.13
path: /c/openlogic-openjdk-17.0.13+11-windows-x64/bin/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.5
wanted: ^0.74.5
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
info React Native v0.76.6 is now available (your project is running on v0.74.5).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.6
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.5
info For more info, check out "https://reactnative.dev/docs/upgrading?os=windows".
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = findProperty('android.buildToolsVersion') ?:'34.0.0'
minSdkVersion =Integer.parseInt(findProperty('android.minSdkVersion') ?:'23')
compileSdkVersion =Integer.parseInt(findProperty('android.compileSdkVersion') ?:'34')
targetSdkVersion =Integer.parseInt(findProperty('android.targetSdkVersion') ?:'34')
kotlinVersion = findProperty('android.kotlinVersion') ?:'1.9.23'
ndkVersion ="26.1.10909125"
}
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')
}
}
apply plugin: "com.facebook.react.rootproject"
allprojects {
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url(newFile(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android'))
}
maven {
// Android JSC is installed from npm
url(newFile(['node', '--print', "require.resolve('jsc-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), '../dist'))
}
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
}
}
android/app/build.gradle
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()
staticdefversionToNumber(major, minor, patch) {
return patch *100+ minor *10000+ major *1000000
}
defgetRNVersion() {
def version = providers.exec {
workingDir(projectDir)
commandLine("node", "-e", "console.log(require('react-native/package.json').version);")
}.standardOutput.asText.get().trim()
def coreVersion = version.split("-")[0]
def (major, minor, patch) = coreVersion.tokenize('.').collect { it.toInteger() }
return versionToNumber(
major,
minor,
patch
)
}
def rnVersion = getRNVersion()
/** * This is the configuration block to customize your React Native Android app. * By default you don't need to apply any configuration, just uncomment the lines you need.*/
react {
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim())
reactNativeDir =newFile(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
hermesCommand =newFile(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() +"/sdks/hermesc/%OS-BIN%/hermesc"
codegenDir =newFile(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
// Use Expo CLI to bundle the app, this ensures the Metro config// works correctly with Expo projects.
cliFile =newFile(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim())
bundleCommand ="export:embed"/* Folders */// The root of your project, i.e. where "package.json" lives. Default is '..'// root = file("../")// The folder where the react-native NPM package is. Default is ../node_modules/react-native// reactNativeDir = file("../node_modules/react-native")// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen// codegenDir = file("../node_modules/@react-native/codegen")/* Variants */// The list of variants to that are debuggable. For those we're going to// skip the bundling of the JS bundle and the assets. By default is just 'debug'.// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.// debuggableVariants = ["liteDebug", "prodDebug"]/* Bundling */// A list containing the node command and its flags. Default is just 'node'.// nodeExecutableAndArgs = ["node"]//// The path to the CLI configuration file. Default is empty.// bundleConfig = file(../rn-cli.config.js)//// The name of the generated asset file containing your JS bundle// bundleAssetName = "MyApplication.android.bundle"//// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'// entryFile = file("../js/MyApplication.android.js")//// A list of extra flags to pass to the 'bundle' commands.// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle// extraPackagerArgs = []/* Hermes Commands */// The hermes compiler command to run. By default it is 'hermesc'// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"//// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"// hermesFlags = ["-O", "-output-source-map"]if (rnVersion >= versionToNumber(0, 75, 0)) {
/* Autolinking */
autolinkLibrariesWithApp()
}
}
/** * Set this to true to Run Proguard on Release builds to minify the Java bytecode.*/def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInReleaseBuilds') ?:false).toBoolean()
/** * The preferred build flavor of JavaScriptCore (JSC) * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default.*/def jscFlavor ='org.webkit:android-jsc:+'
android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
namespace 'com.odaytelbany.Challenge30s'
defaultConfig {
applicationId 'com.odaytelbany.Challenge30s'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0.0"
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?:false)
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
crunchPngs (findProperty('android.enablePngCrunchInReleaseBuilds')?.toBoolean() ?:true)
}
}
packagingOptions {
jniLibs {
useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?:false)
}
}
}
// Apply static values from `gradle.properties` to the `android.packagingOptions`// Accepts values in comma delimited lists, example:// android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini
["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop->// Split option: 'foo,bar' -> ['foo', 'bar']def options = (findProperty("android.packagingOptions.$prop") ?:"").split(",");
// Trim all elements in place.for (i in0..<options.size()) options[i] = options[i].trim();
// `[] - ""` is essentially `[""].filter(Boolean)` removing all empty strings.
options -=""if (options.length >0) {
println"android.packagingOptions.$prop += $options ($options.length)"// Ex: android.packagingOptions.pickFirsts += '**/SCCS/**'
options.each {
android.packagingOptions[prop] += it
}
}
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
def isGifEnabled = (findProperty('expo.gif.enabled') ?:"") =="true";
def isWebpEnabled = (findProperty('expo.webp.enabled') ?:"") =="true";
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?:"") =="true";
if (isGifEnabled) {
// For animated gif support
implementation("com.facebook.fresco:animated-gif:${reactAndroidLibs.versions.fresco.get()}")
}
if (isWebpEnabled) {
// For webp support
implementation("com.facebook.fresco:webpsupport:${reactAndroidLibs.versions.fresco.get()}")
if (isWebpAnimatedEnabled) {
// Animated webp support
implementation("com.facebook.fresco:animated-webp:${reactAndroidLibs.versions.fresco.get()}")
}
}
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
if (rnVersion < versionToNumber(0, 75, 0)) {
apply from: newFile(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesAppBuildGradle(project)
}
android/settings.gradle
AndroidManifest.xml
The text was updated successfully, but these errors were encountered:
What happened?
Hello, i have an issue after creating a dev build, its done successfully but after the setup of apk it doesnt work, its just flash then stop.
i think this is related to the problem:
Platforms
Android, but have not tested behavior on iOS
React Native Info
Are your using Typescript?
package.json
app.json
ios/Podfile
android/build.gradle
android/app/build.gradle
android/settings.gradle
AndroidManifest.xml
The text was updated successfully, but these errors were encountered: