ondato / ondato-sdk-react-native

MIT License
3 stars 5 forks source link

Building Ondato 2.5.4 on android issue #7

Closed vladas3000 closed 1 week ago

vladas3000 commented 4 months ago

Hey! I have an issue while building ondato on android

React native: 73.5 Ondato: 2.5.4

Indeed no such file in node_modules

Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. > Could not find com.gemalto.jp2:jp2-android:1.0. Searched in the following locations: - file:/Users/user/Documents/app/node_modules/ondato-sdk-react-native/android/local/repo/com/gemalto/jp2/jp2-android/1.0/jp2-android-1.0.pom - https://oss.sonatype.org/content/repositories/snapshots/com/gemalto/jp2/jp2-android/1.0/jp2-android-1.0.pom - https://repo.maven.apache.org/maven2/com/gemalto/jp2/jp2-android/1.0/jp2-android-1.0.pom - file:/Users/user/Documents/app/node_modules/jsc-android/dist/com/gemalto/jp2/jp2-android/1.0/jp2-android-1.0.pom - https://dl.google.com/dl/android/maven2/com/gemalto/jp2/jp2-android/1.0/jp2-android-1.0.pom - https://www.jitpack.io/com/gemalto/jp2/jp2-android/1.0/jp2-android-1.0.pom Required by: project :app > project :ondato-sdk-react-native > com.kyc.ondato:sdk:2.5.4
edgaras-simanavicius commented 4 months ago

Do you have the jcenter() repository added to the android project?

theafolayan commented 4 months ago

Facing the same issue and this is my build.gradle file


    repositories {

    jcenter()

     maven {
         url "${rootDir}/../../android/local/repo"
     }
     maven {
         url "${rootDir}/../node_modules/ondato-sdk-react-native/android/local/repo"
     }
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android'))
        }
        maven {
            // Android JSC is installed from npm
            url(new File(['node', '--print', "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), '../dist'))
        }

        google()
        mavenCentral()
        maven { url 'https://www.jitpack.io' }
    }
}```
vladas3000 commented 4 months ago

@edgaras-simanavicius No, I don't have jcenter(), it's replaced with mavenCentral()

theafolayan commented 3 months ago

For anyone using expo, I was able to successfully write a config plugin to help with the installation process here => https://www.npmjs.com/package/ondato-expo-config-plugin

Svaike commented 2 months ago

@vladas3000 please confirm if the 2.5.6 version resolves the issue

esipavicius commented 1 month ago

@vladas3000 please confirm if the 2.5.6 version resolves the issue

Hi. At 2.5.6 version its working, but can't launch app. This is what I got

Screenshot 2024-08-22 at 15 34 14
vladas3000 commented 1 week ago

2.5.10 fixed the issue