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

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. #122

Closed
jschoolcraft opened this issue Jul 17, 2018 · 7 comments

Comments

@jschoolcraft
Copy link

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve project :react-native-fetch-blob.
     Required by:
         project :app
      > Unable to find a matching configuration of project :react-native-fetch-blob: None of the consumable configurations have attributes.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

rn info:

❯ rn info
Scanning folders for symlinks in /Users/jschoolcraft/code/clients/skillscout/SkillScoutApp/node_modules (18ms)

Environment:
  OS:  macOS High Sierra 10.13.6
  Node:  10.6.0
  Yarn:  1.7.0
  npm:  6.1.0
  Watchman:  4.9.0
  Xcode:  Xcode 9.4.1 Build version 9F2000
  Android Studio:  3.1 AI-173.4819257

Packages: (wanted => installed)
  react: 16.3.1 => 16.3.1
  react-native: 0.55.3 => 0.55.3

rn-fetch-blob:

❯ ag blob yarn.lock
4448:rn-fetch-blob@^0.10.11:
4450:  resolved "https://registry.yarnpkg.com/rn-fetch-blob/-/rn-fetch-blob-0.10.11.tgz#5c55c90c59eb7d064770416a980eedecc909594d"
@davimur
Copy link

davimur commented Jul 27, 2018

Any comment on this? did you find the solution? I got exactly the same error

@jschoolcraft
Copy link
Author

jschoolcraft commented Jul 27, 2018 via email

@Traviskn
Copy link

It looks like your project still has some references to the old package name react-native-fetch-blob, it should be rn-fetch-blob.

@jschoolcraft
Copy link
Author

It does...

❯ ag blob
/project.pbxproj
32:		52050AC7E7B04CA0AD60A38E /* libRNFetchBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DBFCD6D89F9A4FE49E120961 /* libRNFetchBlob.a */; };
43:		ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
114:			containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
117:			remoteInfo = "RCTBlob-tvOS";
324:			containerPortal = 83265588C55D4D968ECA8306 /* RNFetchBlob.xcodeproj */;
327:			remoteInfo = RNFetchBlob;
366:			containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
369:			remoteInfo = RCTBlob;
410:		83265588C55D4D968ECA8306 /* RNFetchBlob.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFetchBlob.xcodeproj; path = "../node_modules/rn-fetch-blob/ios/RNFetchBlob.xcodeproj"; sourceTree = "<group>"; };
415:		ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
420:		DBFCD6D89F9A4FE49E120961 /* libRNFetchBlob.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFetchBlob.a; sourceTree = "<group>"; };
439:				ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
458:				52050AC7E7B04CA0AD60A38E /* libRNFetchBlob.a in Frameworks */,
607:				DBFCD6D89F9A4FE49E120961 /* libRNFetchBlob.a */,
641:				628BCD7C20EBC6E5001183BE /* libRNFetchBlob.a */,
711:				ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */,
726:				83265588C55D4D968ECA8306 /* RNFetchBlob.xcodeproj */,
769:				ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
770:				2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */,
860:					ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
912:					ProjectRef = 83265588C55D4D968ECA8306 /* RNFetchBlob.xcodeproj */;
988:		2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = {
991:			path = "libRCTBlob-tvOS.a";
1198:		628BCD7C20EBC6E5001183BE /* libRNFetchBlob.a */ = {
1201:			path = libRNFetchBlob.a;
1240:		ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
1243:			path = libRCTBlob.a;
1353:					"$(SRCROOT)/../node_modules/react-native-fetch-blob/ios/**",
1355:					"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
1392:					"$(SRCROOT)/../node_modules/react-native-fetch-blob/ios/**",
1394:					"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
1434:					"$(SRCROOT)/../node_modules/react-native-fetch-blob/ios/**",
1436:					"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
1468:					"$(SRCROOT)/../node_modules/react-native-fetch-blob/ios/**",
1470:					"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",

package.json
30:		"rn-fetch-blob": "^0.10.11"

yarn.lock
4448:rn-fetch-blob@^0.10.11:
4450:  resolved "https://registry.yarnpkg.com/rn-fetch-blob/-/rn-fetch-blob-0.10.11.tgz#5c55c90c59eb7d064770416a980eedecc909594d"

android/app/build.gradle
142:    implementation project(':rn-fetch-blob')
143:    implementation project(':react-native-fetch-blob')

android/app/src/main/java/com/skillscoutapp/MainApplication.java
7:import com.RNFetchBlob.RNFetchBlobPackage;
8:import com.RNFetchBlob.RNFetchBlobPackage;
35:            new RNFetchBlobPackage(),
36:            new RNFetchBlobPackage(),

android/settings.gradle
4:include ':rn-fetch-blob'
5:project(':rn-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/rn-fetch-blob/android')
6:include ':react-native-fetch-blob'
7:project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')

App.js
21:// https://github.com/hotchpotch/react-navigation-mobx-example/blob/master/src/App.js

src/stores/AwsStore.js
9:import RNFetchBlob from 'rn-fetch-blob'
71:      const result = await RNFetchBlob.fetch('PUT', s3Url, {
73:      }, RNFetchBlob.wrap(file.url))
74:      console.log('S3 PUT RNFetchBlob.fetch result', result)

❯

Thanks for the catch, I'll remove them and see what happens.

@jschoolcraft
Copy link
Author

Seems to have done the trick, submitted a PR #133 to add some documentation to help anyone else that might have hit this snag.

@Usamashahid76
Copy link

use this first
yarn remove react-native-fetch-blob
Remove compile('react-native-fetch-blob') from build.gradle from android folder

@HydroBirous
Copy link

Go to android/app/build.gradle and remove this line:
implementation project(':react-native-fetch-blob')

If you reinstall any packages from your project, make sure you removed those line (if they do exist)

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

5 participants