This commit is contained in:
tx 2024-12-27 15:23:05 +08:00
parent eff201284f
commit ce065dfab9
2 changed files with 16 additions and 5 deletions

View File

@ -7,7 +7,12 @@ import Toast from 'react-native-toast-message';
import { Platform } from 'react-native';
import { AuthProvider, useAuth } from './src/context/AuthContext';
import { setToastFunction, setLogoutFunction } from './src/utils/api';
import { AMapSdk } from 'react-native-amap3d';
AMapSdk.init(Platform.select({
android: '812efd3a950ba3675f928630302c6463',
}));
const AppContent = () => {
const { logout } = useAuth();

View File

@ -79,7 +79,7 @@ android {
all*.exclude group: 'com.amap.api', module: 'location'
}
defaultConfig {
missingDimensionStrategy 'react-native-camera', 'general'
missingDimensionStrategy 'react-native-camera', 'general'
applicationId "com.bikeapp_demo"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
@ -87,6 +87,12 @@ android {
versionName "1.0"
}
signingConfigs {
release {
storeFile file('my-release-key.jks')
storePassword 'jq888786' //
keyAlias 'my-key-alias' //
keyPassword 'jq888786' //
}
debug {
storeFile file('debug.keystore')
storePassword 'android'
@ -101,7 +107,7 @@ android {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
@ -112,10 +118,10 @@ dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation "com.google.android.gms:play-services-vision:20.1.3"
implementation "com.google.android.gms:play-services-vision:20.1.3"
implementation "com.google.android.gms:play-services-vision-common:19.1.3"
implementation project(':react-native-camera')
implementation 'com.amap.api:3dmap:latest.integration'
implementation 'com.amap.api:3dmap:latest.integration'
implementation 'com.amap.api:location:latest.integration'
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
@ -124,4 +130,4 @@ dependencies {
}
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)