Environment: RN 0.35 & Android 5
Log:
MainApplication.java:47: error: constructor OrientationPackage in class OrientationPackage cannot be applied to given types;
new OrientationPackage(),
^
required: Activity
found: no arguments
reason: actual and formal argument lists differ in length
1 error
:app:compileDebugJava FAILED
FAILURE: Build failed with an exception.
@cbcye, the version on https://www.npmjs.com/package/react-native-orientation is wrong.
For now, change version on you package.json from "react-native-orientation": "^1.17.0" to "react-native-orientation": "yamill/react-native-orientation"
@yamill, please, publish a new version on npm.
Environment: RN 0.36 & Android 5
i meet the same error when complie android app @cbcye
did you solved the problem ??
@nidorx can you give me some idea
@yamill, please, publish a new version on npm.
@yamill I'm getting the same issue as the two above.
Fixed it with @nidorx's solution, but would be nice to have the npm module updated, so the build instructions work out-of-the-box.
@nidorx getting same error but couldn't fix it by changing that in package.json
Same Here not fixed
@KBepo and @asela-wijesinghe and anyone else still seeing the problem after applying @nidorx's solution: did you unlink the old version and re-link the new version?
The signature of the OrientationPackage constructor changed, but you have to re-link in order to update MainApplication correctly.
For anyone still having this problem after trying everything said here, try also replacing in the MainApplication.java
new OrientationPackage(this),
with this
new OrientationPackage(),
IMPORTANT, verify that new OrientationPackage(), is not repeated as it was in mine.
For anyone still having this problem after trying everything said here, try also replacing in the MainApplication.java
new OrientationPackage(this),with this
new OrientationPackage(),IMPORTANT, verify that
new OrientationPackage(),is not repeated as it was in mine.
this works for me after all, thanks!
Most helpful comment
@cbcye, the version on https://www.npmjs.com/package/react-native-orientation is wrong.
For now, change version on you
package.jsonfrom"react-native-orientation": "^1.17.0"to"react-native-orientation": "yamill/react-native-orientation"@yamill, please, publish a new version on npm.