Browse Source

update

product
winter 2 years ago
parent
commit
f67a4fb9cb
15 changed files with 3315 additions and 2691 deletions
  1. +3
    -3
      App.js
  2. +5
    -4
      android/app/build.gradle
  3. +4
    -1
      android/app/src/main/AndroidManifest.xml
  4. +593
    -0
      android/app/src/main/assets/index.android.bundle
  5. BIN
      android/app/src/main/res/drawable-mdpi/image_backgroundyellow.png
  6. BIN
      android/app/src/main/res/drawable-mdpi/image_hot_gray.png
  7. BIN
      android/app/src/main/res/drawable-mdpi/image_hot_yellow.png
  8. BIN
      android/app/src/main/res/drawable-mdpi/image_star_gray.png
  9. BIN
      android/app/src/main/res/drawable-mdpi/image_star_yellow.png
  10. BIN
      android/app/src/main/res/drawable-mdpi/image_title_yellow.png
  11. +8
    -4
      android/build.gradle
  12. +3
    -1
      android/gradle.properties
  13. +27
    -0
      apk命令.txt
  14. +2668
    -2676
      package-lock.json
  15. +4
    -2
      package.json

+ 3
- 3
App.js View File

@@ -979,9 +979,9 @@ getAdView(){

render() {

if (this.state.updating) {
return this.getUpdateView();
}
//if (this.state.updating) {
// return this.getUpdateView();
//}
return this.getAdView();
}
}


+ 5
- 4
android/app/build.gradle View File

@@ -116,6 +116,7 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode = getVersionCode()
versionName getVersionName()
missingDimensionStrategy 'react-native-camera',"general"
}

android.applicationVariants.all { variant ->
@@ -144,9 +145,9 @@ android {
}
buildTypes {
debug {
buildConfigField "String", "API_HOST", "\"https://mall.youlane.cn/\""
buildConfigField "String", "CODEPUSH_HOST", "\"https://update.youlane.cn/\""
buildConfigField "String", "CODEPUSH_KEY", "\"8snO1yoHlvhEtBjr02zTr3g1comw4ksvOXqog\""
buildConfigField "String", "API_HOST", "\"https://admin.malls.iformall.com/\""
buildConfigField "String", "CODEPUSH_HOST", "\"https://update.malls.iformall.com/\""
buildConfigField "String", "CODEPUSH_KEY", "\"9rYZYySFD0ryN5wCD9YmjJkT55Kf4ksvOXqog\""
}
release {
buildConfigField "String", "API_HOST", "\"https://admintest.malls.iformall.com/\""
@@ -187,7 +188,7 @@ dependencies {
implementation project(':react-native-code-push')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "com.facebook.react:react-native:0.59.9" // From node_modules
}

// Run this once to be able to run the application with BUCK


+ 4
- 1
android/app/src/main/AndroidManifest.xml View File

@@ -1,4 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.screenad">

<uses-permission android:name="android.permission.INTERNET" />
@@ -12,7 +13,9 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:replace="android:appComponentFactory"
android:appComponentFactory="sss">

<activity
android:name=".MainActivity"


+ 593
- 0
android/app/src/main/assets/index.android.bundle
File diff suppressed because it is too large
View File


BIN
android/app/src/main/res/drawable-mdpi/image_backgroundyellow.png View File

Before After
Width: 1080  |  Height: 1920  |  Size: 824 KiB

BIN
android/app/src/main/res/drawable-mdpi/image_hot_gray.png View File

Before After
Width: 200  |  Height: 200  |  Size: 5.3 KiB

BIN
android/app/src/main/res/drawable-mdpi/image_hot_yellow.png View File

Before After
Width: 200  |  Height: 200  |  Size: 5.5 KiB

BIN
android/app/src/main/res/drawable-mdpi/image_star_gray.png View File

Before After
Width: 200  |  Height: 200  |  Size: 5.7 KiB

BIN
android/app/src/main/res/drawable-mdpi/image_star_yellow.png View File

Before After
Width: 200  |  Height: 200  |  Size: 5.9 KiB

BIN
android/app/src/main/res/drawable-mdpi/image_title_yellow.png View File

Before After
Width: 539  |  Height: 195  |  Size: 64 KiB

+ 8
- 4
android/build.gradle View File

@@ -9,8 +9,10 @@ buildscript {
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
// google()
// jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.4.0")
@@ -23,8 +25,10 @@ buildscript {
allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
// google()
// jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"


+ 3
- 1
android/gradle.properties View File

@@ -19,4 +19,6 @@
MYAPP_RELEASE_STORE_FILE=screenAd.keystore
MYAPP_RELEASE_KEY_ALIAS=screenAd
MYAPP_RELEASE_STORE_PASSWORD=formall2019
MYAPP_RELEASE_KEY_PASSWORD=formall2019
MYAPP_RELEASE_KEY_PASSWORD=formall2019
#android.useAndroidX=true
#android.enableJetifier=true

+ 27
- 0
apk命令.txt View File

@@ -0,0 +1,27 @@
在项目目录执行如下:
yarn

npm install react-native-camera --save react-native link react-native-camera
npm install --save-dev jetifier
npx jetify -r

yarn react-native run-android

然后修改node_modules/react-native-camera/android/build.gradle

把google()改成
maven {
url 'https://maven.aliyun.com/repository/google'
name 'Google'
}

再执行
yarn react-native run-android

在android\app\src\main创建文件夹assets
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

#打包apk
进入android目录
执行 ./gradlew app:assembleDebug
打包到android\app\build\outputs\apk\debug

+ 2668
- 2676
package-lock.json
File diff suppressed because it is too large
View File


+ 4
- 2
package.json View File

@@ -8,10 +8,11 @@
},
"dependencies": {
"code-push": "2.0.7",
"link": "^1.5.1",
"react": "16.8.3",
"react-native": "0.59.9",
"react-native": "^0.59.9",
"react-native-animatable": "^1.3.2",
"react-native-camera": "^1.12.0",
"react-native-camera": "^2.9.0",
"react-native-code-push": "5.6.1",
"react-native-device-info": "^2.1.2",
"react-native-shadow": "^1.2.2",
@@ -26,6 +27,7 @@
"@babel/runtime": "^7.4.5",
"babel-jest": "^24.8.0",
"jest": "^24.8.0",
"jetifier": "^2.0.0",
"metro-react-native-babel-preset": "^0.54.1",
"react-test-renderer": "16.8.3"
},


Loading…
Cancel
Save