react-native-custom-tabs
react-native-custom-tabs copied to clipboard
error: cannot find symbol new CustomTabsPackage()
:app:prepareComGoogleFirebaseFirebaseCore1601Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIid1620Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIidInterop1600Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseMeasurementConnector1600Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseMeasurementConnectorImpl1601Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseMessaging1710Library UP-TO-DATE
:app:prepareKoenigReactNativeFcmUnspecifiedLibrary UP-TO-DATE
:app:prepareKoenigReactNativeNetworkInfoUnspecifiedLibrary UP-TO-DATE
:app:prepareKoenigReactNativeVectorIconsUnspecifiedLibrary UP-TO-DATE
:app:prepareMeLeolinShortcutBadger1117Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Parsing json file: D:\on_working_project\ko_stu_repo\koenig-student\android\app\google-services.json
:app:generateDebugResources
:app:mergeDebugResources UP-TO-DATE
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
D:\on_working_project\ko_stu_repo\koenig-student\android\app\src\main\java\com\koenig\MainApplication.java:29: error: cannot find symbol
new CustomTabsPackage(),
^
symbol: class CustomTabsPackage
1 error
:app:compileDebugJavaWithJavac FAILED
compilation fails with above messages
i use "react-native": "^0.50.3", "react-native-chrome-custom-tabs": "0.0.2",
I just add google maven and jitpack maven repos in project (not app) build.gradle file like this:
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven {
url "https://jitpack.io"
}
}
}
and it helps you can see properly configuration in my project
import com.github.droibit.android.reactnative.customtabs.CustomTabsPackage;
Just add this at the top of your MainApplication.java file
If still not solved do the following.
@Override protected List<ReactPackage> getPackages() { return Arrays.asList( ..., new CustomTabsPackage() // adding package ); }
Add this if you're using latest react native version packages.add( new CustomTabsPackage());