Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: cannot find symbol new CustomTabsPackage() #29

Open
yusuf987 opened this issue Jul 13, 2018 · 2 comments
Open

error: cannot find symbol new CustomTabsPackage() #29

yusuf987 opened this issue Jul 13, 2018 · 2 comments

Comments

@yusuf987
Copy link

: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",

@DragonSpirit
Copy link

DragonSpirit commented Jul 24, 2018

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

@yogeshglate
Copy link

yogeshglate commented Feb 11, 2023

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 getPackages() {
return Arrays.asList(
...,
new CustomTabsPackage() // adding package
);
}

Add this if you're using latest react native version
packages.add( new CustomTabsPackage());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants