Created
April 13, 2020 18:24
-
-
Save akeemphilbert/8323a7b71e682469b922920a624b35a8 to your computer and use it in GitHub Desktop.
Patches for ViroReact + React Native 0.62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- app/android/app/src/main/AndroidManifest.xml (date 1586122131892) | |
+++ app/android/app/src/main/AndroidManifest.xml (date 1586122131892) | |
@@ -2,6 +2,7 @@ | |
package="com.app"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
+ <uses-permission android:name="android.permission.CAMERA" /> | |
<application | |
android:name=".MainApplication" | |
@@ -9,6 +10,7 @@ | |
android:icon="@mipmap/ic_launcher" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:allowBackup="false" | |
+ android:usesCleartextTraffic="true" | |
android:theme="@style/AppTheme"> | |
<activity | |
android:name=".MainActivity" | |
@@ -22,6 +24,7 @@ | |
</intent-filter> | |
</activity> | |
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> | |
+ <meta-data android:name="com.google.ar.core" android:value="optional" /> | |
</application> | |
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- app/build.gradle (date 1586133245000) | |
+++ app/build.gradle (date 1586133245000) | |
@@ -78,7 +78,7 @@ | |
*/ | |
project.ext.react = [ | |
- enableHermes: false, // clean and rebuild if changing | |
+ enableHermes: false, // clean and rebuild if changing | |
] | |
apply from: "../../node_modules/react-native/react.gradle" | |
@@ -130,7 +130,7 @@ | |
defaultConfig { | |
applicationId "com.app" | |
- minSdkVersion rootProject.ext.minSdkVersion | |
+ minSdkVersion 23 | |
targetSdkVersion rootProject.ext.targetSdkVersion | |
versionCode 1 | |
versionName "1.0" | |
@@ -151,6 +151,7 @@ | |
keyPassword 'android' | |
} | |
} | |
+ | |
buildTypes { | |
debug { | |
signingConfig signingConfigs.debug | |
@@ -194,16 +195,30 @@ | |
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" | |
+ implementation fileTree(dir: 'libs', include: ['*.jar']) | |
+ | |
+ implementation project(':arcore_client') | |
+ implementation project(':gvr_common') | |
+ implementation project(path: ':viro_renderer') | |
+ implementation project(path: ':react_viro') | |
+ implementation 'com.google.android.exoplayer:exoplayer:2.7.1' | |
+ implementation 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7' | |
+ implementation 'com.amazonaws:aws-android-sdk-core:2.7.7' | |
+ implementation 'com.amazonaws:aws-android-sdk-ddb:2.7.7' | |
+ implementation 'com.amazonaws:aws-android-sdk-ddb-mapper:2.7.7' | |
+ implementation 'com.amazonaws:aws-android-sdk-cognito:2.7.7' | |
+ implementation 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.7.7' | |
+ | |
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { | |
- exclude group:'com.facebook.fbjni' | |
+ exclude group: 'com.facebook.fbjni' | |
} | |
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { | |
- exclude group:'com.facebook.flipper' | |
+ exclude group: 'com.facebook.flipper' | |
} | |
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { | |
- exclude group:'com.facebook.flipper' | |
+ exclude group: 'com.facebook.flipper' | |
} | |
if (enableHermes) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- build.gradle (date 1586132755000) | |
+++ build.gradle (date 1586132755000) | |
@@ -3,7 +3,7 @@ | |
buildscript { | |
ext { | |
buildToolsVersion = "28.0.3" | |
- minSdkVersion = 16 | |
+ minSdkVersion = 21 | |
compileSdkVersion = 28 | |
targetSdkVersion = 28 | |
} | |
@@ -20,8 +20,16 @@ | |
} | |
allprojects { | |
+ configurations.matching { it.name == '_internal_aapt2_binary' }.all { config -> | |
+ config.resolutionStrategy.eachDependency { details -> | |
+ details.useVersion("3.5.0-alpha03-5252756") | |
+ } | |
+ } | |
repositories { | |
mavenLocal() | |
+ maven { | |
+ url 'https://maven.google.com/' | |
+ } | |
maven { | |
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | |
url("$rootDir/../node_modules/react-native/android") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- app/src/main/java/com/app/MainApplication.java (date 1586133925000) | |
+++ app/src/main/java/com/app/MainApplication.java (date 1586133925000) | |
@@ -10,6 +10,8 @@ | |
import com.facebook.soloader.SoLoader; | |
import java.lang.reflect.InvocationTargetException; | |
import java.util.List; | |
+import com.viromedia.bridge.ReactViroPackage; | |
+import com.facebook.react.shell.MainReactPackage; | |
public class MainApplication extends Application implements ReactApplication { | |
@@ -25,7 +27,7 @@ | |
@SuppressWarnings("UnnecessaryLocalVariable") | |
List<ReactPackage> packages = new PackageList(this).getPackages(); | |
// Packages that cannot be autolinked yet can be added manually here, for example: | |
- // packages.add(new MyReactNativePackage()); | |
+ packages.add(new ReactViroPackage(ReactViroPackage.ViroPlatform.AR)); | |
return packages; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- settings.gradle (date 1586129024000) | |
+++ settings.gradle (date 1586129024000) | |
@@ -1,3 +1,7 @@ | |
rootProject.name = 'app' | |
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) | |
-include ':app' | |
+include ':app', ':react_viro', ':arcore_client', ':gvr_common', ':viro_renderer' | |
+project(':arcore_client').projectDir = new File('../node_modules/react-viro/android/arcore_client') | |
+project(':gvr_common').projectDir = new File('../node_modules/react-viro/android/gvr_common') | |
+project(':viro_renderer').projectDir = new File('../node_modules/react-viro/android/viro_renderer') | |
+project(':react_viro').projectDir = new File('../node_modules/react-viro/android/react_viro') |
Unfortunately I've not messed with the code in a while so something may
have broken in more recent versions
Akeem Philbert | Wepala LLC (Founder)
[email protected] | + 1 646 450 1632
…On Tue, Jan 5, 2021 at 5:52 PM Kit Masaracchia ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Ditto to the above - it's crashing on Android after implementing the
patches suggested. Any news on an update for this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/8323a7b71e682469b922920a624b35a8#gistcomment-3583508>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA2VRR3USL75DPNAMWYSV3SYOCYPANCNFSM4MXG3ESQ>
.
Same here, crashing after these changes. Tried with react-native version 0.63.3.
Same here, crashing after these changes. Tried with react-native version 0.63.3.
Have you lucky? I'm struggling with the same
I'm getting > Task: app:processDebugResources FAILED when running npm run android after setting up those files.
using react-native: "~0.63.4"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ditto to the above - it's crashing on Android after implementing the patches suggested. Any news on an update for this?