Get Android build working
This commit is contained in:
@@ -28,10 +28,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
|
||||
<meta-data
|
||||
android:name="com.google.android.geo.API_KEY"
|
||||
android:value="AIzaSyAC7r1GjMFL1atZdbEcFSdCaXDrPnISqTc" />
|
||||
<meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyAC7r1GjMFL1atZdbEcFSdCaXDrPnISqTc" />
|
||||
<meta-data android:name="com.google.ar.core" android:value="required" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package com.deightonar;
|
||||
|
||||
// import com.facebook.react.ReactActivity;
|
||||
import com.reactnativenavigation.controllers.SplashActivity;
|
||||
import com.facebook.react.ReactActivity;
|
||||
|
||||
public class MainActivity extends SplashActivity {
|
||||
// @Override
|
||||
// protected String getMainComponentName() {
|
||||
// return "DeightonAR";
|
||||
// }
|
||||
public class MainActivity extends ReactActivity {
|
||||
|
||||
/**
|
||||
* Returns the name of the main component registered from JavaScript.
|
||||
* This is used to schedule rendering of the component.
|
||||
*/
|
||||
@Override
|
||||
protected String getMainComponentName() {
|
||||
return "DeightonAR";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,67 +11,41 @@ import com.facebook.soloader.SoLoader;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.reactnativenavigation.NavigationApplication;
|
||||
import com.airbnb.android.react.maps.MapsPackage;
|
||||
|
||||
import com.viromedia.bridge.ReactViroPackage;
|
||||
|
||||
public class MainApplication extends NavigationApplication {
|
||||
import com.airbnb.android.react.maps.MapsPackage;
|
||||
|
||||
public class MainApplication extends Application implements ReactApplication {
|
||||
|
||||
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
||||
@Override
|
||||
public boolean isDebug() {
|
||||
// Make sure you are using BuildConfig from your own application
|
||||
public boolean getUseDeveloperSupport() {
|
||||
return BuildConfig.DEBUG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
// Add additional packages you require here
|
||||
// No need to add RnnPackage and MainReactPackage
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MapsPackage(),
|
||||
new ReactViroPackage(ReactViroPackage.ViroPlatform.GVR)
|
||||
new ReactViroPackage(ReactViroPackage.ViroPlatform.GVR),
|
||||
new MapsPackage(),
|
||||
new MainReactPackage()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReactPackage> createAdditionalReactPackages() {
|
||||
return getPackages();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getJSMainModuleName() {
|
||||
protected String getJSMainModuleName() {
|
||||
return "index";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// public class MainApplication extends Application implements ReactApplication {
|
||||
//
|
||||
// private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
||||
// @Override
|
||||
// public boolean getUseDeveloperSupport() {
|
||||
// return BuildConfig.DEBUG;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected List<ReactPackage> getPackages() {
|
||||
// return Arrays.<ReactPackage>asList(
|
||||
// new MainReactPackage()
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected String getJSMainModuleName() {
|
||||
// return "index";
|
||||
// }
|
||||
// };
|
||||
//
|
||||
// @Override
|
||||
// public ReactNativeHost getReactNativeHost() {
|
||||
// return mReactNativeHost;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onCreate() {
|
||||
// super.onCreate();
|
||||
// SoLoader.init(this, /* native exopackage */ false);
|
||||
// }
|
||||
// }
|
||||
@Override
|
||||
public ReactNativeHost getReactNativeHost() {
|
||||
return mReactNativeHost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
SoLoader.init(this, /* native exopackage */ false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user