2017-12-29 37 views
0

Android AP 및 Android AP에 설치할 APK를 서명했습니다. 설치 후 초 안에 충돌/닫힙니다.Android 앱을 열고 닫을 때 - 기본 서명 된 앱을 다시 사용합니다.

서명 된 출시 APK를 받기 위해 공식적인 대응 문서를 참조했습니다. React Native Documentation

내가

def enableProguardInReleaseBuilds = false 

android { 
    compileSdkVersion 23 
    buildToolsVersion '26.0.2' 

    defaultConfig { 
     applicationId "com.samplemobileapp" 
     minSdkVersion 16 
     targetSdkVersion 22 
     versionCode 1 
     versionName "1.0" 
     ndk { 
      abiFilters "armeabi-v7a", "x86" 
     } 
    } 
    signingConfigs { 
     release { 
      if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { 
       storeFile file(MYAPP_RELEASE_STORE_FILE) 
       storePassword MYAPP_RELEASE_STORE_PASSWORD 
       keyAlias MYAPP_RELEASE_KEY_ALIAS 
       keyPassword MYAPP_RELEASE_KEY_PASSWORD 
      } 
     } 
    } 
    buildTypes { 
     release { 
      signingConfig signingConfigs.release 
      // minifyEnabled enableProguardInReleaseBuilds 
      // proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 
     } 
    } 
    splits { 
     abi { 
      reset() 
      enable enableSeparateBuildPerCPUArchitecture 
      universalApk false // If true, also generate a universal APK 
      include "armeabi-v7a", "x86" 
     } 
    } 
    // buildTypes { 
    //  release { 
    //   minifyEnabled enableProguardInReleaseBuilds 
    //   proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 
    //  } 
    // } 
    // applicationVariants are e.g. debug, release 
    applicationVariants.all { variant -> 
     variant.outputs.each { output -> 
      // For each separate APK per architecture, set a unique version code as described here: 
      // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 
      def versionCodes = ["armeabi-v7a":1, "x86":2] 
      def abi = output.getFilter(OutputFile.ABI) 
      if (abi != null) { // null for the universal-debug, universal-release variants 
       output.versionCodeOverride = 
         versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 
      } 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: "libs", include: ["*.jar"]) 
    compile "com.android.support:appcompat-v7:23.0.1" 
    compile "com.facebook.react:react-native:+" // From node_modules 
} 

은 알려 주시기 바랍니다 내 build.gradle 둘러싸하고있어이 프레임 워크 문제 또는 코드 문제입니다.

답변

0

gradle.properties 파일에서 키 저장소 파일 속성을 설정해야합니다.

당신은 안드로이드/gradle.properties

MYAPP_RELEASE_STORE_FILE=my-release-key.keystore 
MYAPP_RELEASE_KEY_ALIAS=my-key-alias 
MYAPP_RELEASE_STORE_PASSWORD=MYPASS 
MYAPP_RELEASE_KEY_PASSWORD=MYPASS 
+0

이미 설정에서이 파일을 찾을 수 있습니다. –

+0

아마도 이것이 도움이 될 것입니다. lintOptions로 시도해보십시오. [https://stackoverflow.com/questions/20699147/gradle-build-fails-on-lint-task] –