cwRichardKim / jumbosmash-rn

27 stars 6 forks source link

Fixed: install instructions #191

Open jurrian opened 5 years ago

jurrian commented 5 years ago

I have managed to build the app on Android, just to see how it works and fiddle. Since there are no build instructions, I'll will show mine below. Took me not to long to get this running, basically updating gradle solved a lot. These instructions only take care of getting the app running on android, no in-app configuration.

Install instructions

Android

Requirements

  1. Firebase account
  2. react-native-cli: npm install -g react-native-cli
  3. Android SDK
  4. A running Android AVD (virtual device)

Build

Gradle patch

From f521104cdc0cc7b43d847c424e68b422d513ea98 Mon Sep 17 00:00:00 2001
From: Jurrian Tromp <jurrian@argu.co>
Date: Wed, 30 Jan 2019 15:26:33 +0100
Subject: [PATCH] Fixes to get the app running again

---
 android/app/build.gradle                         | 20 ++++++++++++--------
 android/build.gradle                             |  4 +++-
 android/gradle/wrapper/gradle-wrapper.properties |  2 +-
 3 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/android/app/build.gradle b/android/app/build.gradle
index 3d625ce..c6d6a10 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -85,11 +85,11 @@ def enableProguardInReleaseBuilds = false

 android {
     signingConfigs {
-        release {
-            keyAlias 'JumboSmashKey'
-            keyPassword 'ask richard for help'
-            storeFile file('/Users/richard/developer/keystores/jumbosmashKeystore.jks')
-            storePassword 'ask richard for help'
+        debug {
+            storeFile file("debug.keystore")
+            keyAlias 'androiddebugkey'
+            keyPassword 'android'
+            storePassword 'android'
         }
     }
     compileSdkVersion 23
@@ -98,7 +98,7 @@ android {
         applicationId "com.jumbosmash"
         minSdkVersion 16
         vectorDrawables.useSupportLibrary = true
-        targetSdkVersion 22
+        targetSdkVersion 28
         versionCode 7
         versionName "1.1"
         ndk {
@@ -115,10 +115,14 @@ android {
     }
     buildTypes {
         release {
-            signingConfig signingConfigs.release
+            //signingConfig signingConfigs.release
             minifyEnabled enableProguardInReleaseBuilds
             proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
-            debuggable false
+            debuggable true
+        }
+
+        debug {
+            debuggable true
         }
     }
     // applicationVariants are e.g. debug, release
diff --git a/android/build.gradle b/android/build.gradle
index bf0a3ac..13e6ecb 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -2,10 +2,11 @@

 buildscript {
     repositories {
+        google()
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.3.1'
+        classpath 'com.android.tools.build:gradle:3.3.0'
         classpath 'com.google.gms:google-services:3.0.0' // <- react-native-firebase-analytics
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
@@ -15,6 +16,7 @@ buildscript {

 allprojects {
     repositories {
+        google()
         mavenLocal()
         jcenter()
         maven {
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 6ed0868..94e9b74 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
-- 
2.15.1
JoeAshworth commented 5 years ago

Hi @jurrian , did you run into any issues with the Android SDK licenses?

jurrian commented 5 years ago

Not that I can remember. I think I would have included it in the install instructions if I did.