question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build application

See original GitHub issue

I am trying to build my application after adding your threads module when I build I am getting the following error.

:react-native-threads:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE :react-native-threads:compileReleaseJavaWithJavac :react-native-threads:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). /Users/sjain/Documents/Native_App/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/ThreadBaseReactPackage.java:38: error: constructor AndroidInfoModule in class AndroidInfoModule cannot be applied to given types; new AndroidInfoModule(), ^ required: ReactApplicationContext found: no arguments reason: actual and formal argument lists differ in length 1 error :react-native-threads:compileReleaseJavaWithJavac FAILED FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:react-native-threads:compileReleaseJavaWithJavac’.

I tried to do react-native link but thing is I am also using react-native-navigation which has bit different implementation of MainApplication.java file and thus its unable to get the context of ReactApplication.

Below is the implementation of my MainApplication.java file ` public class MainApplication extends NavigationApplication {

@Override
public boolean isDebug() {
    // Make sure you are using BuildConfig from your own application
    return BuildConfig.DEBUG;
}

protected List<ReactPackage> getPackages() {
    // Add additional packages you require here
    // No need to add RnnPackage and MainReactPackage
    return Arrays.<ReactPackage>asList(
        new RNThreadPackage()
    );
}

@Override
public List<ReactPackage> createAdditionalReactPackages() {
    return getPackages();
}

@Override
public String getJSMainModuleName() {
    return "index";
}

} `

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joaom182commented, Jul 25, 2018

I’m using react-native 0.52 and the constructor of AndroidInfoModule not accepts catalystApplicationContext as parameter. So the PR #23 breaks the compatibility with react-native 0.52.

0reactions
jinxaccommented, Sep 18, 2018

After debugging a bit looks like some import issue, package works fine. @sja1n have u tried calling apis from this package? I am looking to build a notification feature which calls my api every few seconds to update the count and data.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed Builds - Visual Studio App Center - Microsoft Learn
If building works locally but not in App Center. Usually this problem is because of uncommitted files, different tooling, or unrestored ...
Read more >
Unable to Build - Build issue - AppGyver forums
All of sudden, I m unable to build the android app, I m getting below error response. I again created a fresh package...
Read more >
Steps to resolve failed to build iOS app error - YouTube
Steps to resolve failed to build iOS app error:1. rm ios/Podfile2. flutter pub upgrade3. flutter pub run4. flutter clean && flutter ...
Read more >
Why am I not able to build an app from scratch? - Quora
1.Get a laptop or desktop, any operating system will work · 2. Download Android studio, and install it · 3. Create a new...
Read more >
Unable to build application for android after installing react ...
Description. Hi, I've recently encountered this error while trying to build my application for android. · Steps to reproduce · Snack or a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found