Tried to install react-native-navigation
> Task :app:checkDebugAarMetadata FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:checkDebugAarMetadata'. > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction > An issue was found when checking AAR metadata: 1. Dependency 'androidx.activity:activity:1.8.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.2 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
This commit is contained in:
parent
183d609bea
commit
9727418dcd
|
@ -1,33 +1,5 @@
|
|||
package com.massive
|
||||
|
||||
import android.os.Bundle
|
||||
import com.facebook.react.ReactActivity
|
||||
import com.facebook.react.ReactActivityDelegate
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
||||
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
||||
import com.reactnativenavigation.NavigationActivity
|
||||
|
||||
class MainActivity : ReactActivity() {
|
||||
/**
|
||||
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
||||
* rendering of the component.
|
||||
*/
|
||||
override fun getMainComponentName(): String? {
|
||||
return "massive"
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the instance of the [ReactActivityDelegate]. Here we use a util class [ ] which allows you to easily enable Fabric and Concurrent React
|
||||
* (aka React 18) with two boolean flags.
|
||||
*/
|
||||
override fun createReactActivityDelegate(): ReactActivityDelegate {
|
||||
return DefaultReactActivityDelegate(
|
||||
this,
|
||||
mainComponentName!!, // If you opted-in for the New Architecture, we enable the Fabric Renderer.
|
||||
fabricEnabled
|
||||
)
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(null)
|
||||
}
|
||||
}
|
||||
class MainActivity : NavigationActivity()
|
|
@ -8,9 +8,11 @@ import com.facebook.react.ReactPackage
|
|||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
||||
import com.facebook.react.defaults.DefaultReactNativeHost
|
||||
import com.facebook.soloader.SoLoader
|
||||
import com.reactnativenavigation.NavigationApplication
|
||||
import com.reactnativenavigation.react.NavigationReactNativeHost
|
||||
|
||||
class MainApplication : Application(), ReactApplication {
|
||||
private val mReactNativeHost: ReactNativeHost = object : DefaultReactNativeHost(this) {
|
||||
class MainApplication : NavigationApplication() {
|
||||
private val mReactNativeHost = object : NavigationReactNativeHost(this) {
|
||||
override fun getUseDeveloperSupport(): Boolean {
|
||||
return BuildConfig.DEBUG
|
||||
}
|
||||
|
@ -37,7 +39,6 @@ class MainApplication : Application(), ReactApplication {
|
|||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
SoLoader.init(this, /* native exopackage */false)
|
||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
||||
load()
|
||||
|
|
|
@ -9,14 +9,19 @@ buildscript {
|
|||
|
||||
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
|
||||
ndkVersion = "23.1.7779620"
|
||||
kotlinVersion = "1.8.22"
|
||||
RNNKotlinVersion = kotlinVersion
|
||||
}
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle")
|
||||
classpath("com.facebook.react:react-native-gradle-plugin")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||
}
|
||||
}
|
||||
|
|
22
index.js
22
index.js
|
@ -2,8 +2,22 @@
|
|||
* @format
|
||||
*/
|
||||
|
||||
import {AppRegistry} from 'react-native';
|
||||
import App from './App';
|
||||
import {name as appName} from './app.json';
|
||||
import { Navigation } from "react-native-navigation";
|
||||
import App from './App'
|
||||
|
||||
AppRegistry.registerComponent(appName, () => App);
|
||||
Navigation.registerComponent('com.massive.WelcomeScreen', () => App)
|
||||
Navigation.events().registerAppLaunchedListener(() => {
|
||||
Navigation.setRoot({
|
||||
root: {
|
||||
stack: {
|
||||
children: [
|
||||
{
|
||||
component: {
|
||||
name: 'com.myApp.WelcomeScreen'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "massive",
|
||||
"version": "2.23",
|
||||
"version": "2.24",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "massive",
|
||||
"version": "2.23",
|
||||
"version": "2.24",
|
||||
"license": "GPL-3.0-only",
|
||||
"dependencies": {
|
||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||
|
@ -34,6 +34,7 @@
|
|||
"react-native-file-access": "^3.0.4",
|
||||
"react-native-gesture-handler": "^2.12.0",
|
||||
"react-native-linear-gradient": "^2.7.3",
|
||||
"react-native-navigation": "^7.38.1",
|
||||
"react-native-pager-view": "^6.2.0",
|
||||
"react-native-paper": "^5.9.1",
|
||||
"react-native-permissions": "^3.10.1",
|
||||
|
@ -9615,6 +9616,11 @@
|
|||
"version": "18.2.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react-lifecycles-compat": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-2.0.0.tgz",
|
||||
"integrity": "sha512-txfpPCQYiazVdcbMRhatqWKcAxJweUu2wDXvts5/7Wyp6+Y9cHojqXHsLPEckzutfHlxZhG8Oiundbmp8Fd6eQ=="
|
||||
},
|
||||
"node_modules/react-native": {
|
||||
"version": "0.72.3",
|
||||
"license": "MIT",
|
||||
|
@ -9729,6 +9735,36 @@
|
|||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-navigation": {
|
||||
"version": "7.38.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-navigation/-/react-native-navigation-7.38.1.tgz",
|
||||
"integrity": "sha512-NMGXJjSWe9qfWRjuvWODV+egUYkQ6Emx4MMF/Ccf0LtikgfYzIUPm5vXXPW/BVEk24PGO1CDUFCVYAZmERZtdQ==",
|
||||
"dependencies": {
|
||||
"hoist-non-react-statics": "3.x.x",
|
||||
"lodash": "4.17.x",
|
||||
"prop-types": "15.x.x",
|
||||
"react-lifecycles-compat": "2.0.0",
|
||||
"tslib": "1.9.3"
|
||||
},
|
||||
"bin": {
|
||||
"rnn-link": "autolink/postlink/run.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"remx": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"remx": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-navigation/node_modules/tslib": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||
},
|
||||
"node_modules/react-native-pager-view": {
|
||||
"version": "6.2.0",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
"react-native-file-access": "^3.0.4",
|
||||
"react-native-gesture-handler": "^2.12.0",
|
||||
"react-native-linear-gradient": "^2.7.3",
|
||||
"react-native-navigation": "^7.38.1",
|
||||
"react-native-pager-view": "^6.2.0",
|
||||
"react-native-paper": "^5.9.1",
|
||||
"react-native-permissions": "^3.10.1",
|
||||
|
@ -71,4 +72,4 @@
|
|||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue