Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Error in demo app. #176

Open
innovationsbg opened this issue Jan 24, 2018 · 2 comments
Open

Error in demo app. #176

innovationsbg opened this issue Jan 24, 2018 · 2 comments

Comments

@innovationsbg
Copy link

innovationsbg commented Jan 24, 2018

I get this error after react-native run-android:

required: Activity,boolean
found: MainActivity
reason: actual and formal argument lists differ in length
1 error
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.

@andyhappy1
Copy link

I'm getting same error. Commenting so I'll be updated on fixes.

@Nikaoto
Copy link

Nikaoto commented Jan 27, 2018

As an android developer, I get this error sometimes. What this usually means is that my android build tools version or some of my dependencies are outdated. You can update the build tools version by going into the android/app/build.gradle file and changing these two lines of code:

compileSdkVersion 26
buildToolsVerion '26.0.2'

The versions in your app may differ.

As of today, the latest versions are 26 and '27.0.3' respectively, so replace the two lines with:

compileSdkVersion 26
buildToolsVerion '27.0.3'

If this doesn't fix it, try updating your dependencies with npm update or whichever package manager you use.

EDIT:
Also, there might also be outdated dependencies inside the build.gradle file. It should look like this:

...
dependencies {
   compile "somedependency:1.2.0"
}

Where somedependency is the name of the dependency and the number following the colon is its version. Try googling those dependencies to find their latest versions and replace the current ones with them. Just back up your build.gradle before this, just in case.

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

No branches or pull requests

3 participants