Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Configuration with name 'default' not found. #62

Closed
Arkanine opened this issue Jul 21, 2016 · 37 comments
Closed

Configuration with name 'default' not found. #62

Arkanine opened this issue Jul 21, 2016 · 37 comments

Comments

@Arkanine
Copy link

Arkanine commented Jul 21, 2016

Hi,

When I try to run app by 'react-native run-android' I get this err:
A problem occurred configuring project ':app'.
Cannot evaluate module react-native-fetch-blob : Configuration with name 'default' not found.
Also I follow installation guide you provided. Please help me figure out with this issue.

Kind regards

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

Hi @Arkanine , this looks like the package not linked. I think I need more information to figure out what's the root cause. What doest your settings.gralde looks like ?

If you're using Android Studio, the project structure should looks like this

2016-07-21 4 31 03

@Arkanine
Copy link
Author

My structure something different and looks this way:
structure
Also you can see settings.gralde

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

@Arkanine , could you check if react-native-fetch-blob exists in your project's node_modules folder ? Looks like the project could not be found in that location.

@Arkanine
Copy link
Author

Arkanine commented Jul 21, 2016

Yea, react-native-fetch-blob exists in node_modules folder. Also in package.json I have "react-native-fetch-blob": "^0.6.3-dev.1"

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

@Arkanine , I've done some tests on clean 0.26~0.29 environments, unfortunately I could not reproduce this issue, the module installed properly. What's the version of your react-native ?

Perhaps you can try remove the package and reinstall it ?

@Arkanine
Copy link
Author

Ok, I'll try to reinstall it.
React-native 0.25.1

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

@Arkanine , I've somehow reproduced the problem ! I removed react-native-fetch-blob from Project Structure -> select react-native-fetch-blob -> click the - button. Then I click the + button import a Gradle project, the error occurs.

2016-07-21 5 38 51

And I fix the problem simply remove the react-native-fetch-blob dependency from Project Structure -> Dependencies (select react-native-fetch-blob) and click -

2016-07-21 5 41 25

After remove the dependency, sync the project again.

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

Besides, after removing the dependency from Project Setting, make sure the following lines exists in settings.gradle.

include ':react-native-fetch-blob'                                                                                                  
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir,' ../node_modules/react-native-fetch-blob/android')                        

@Arkanine
Copy link
Author

Arkanine commented Jul 21, 2016

@wkh237 I'm just reinstalled module.
npm install --save react-native-fetch-blob
rnpm link
All required lines exists in settings.gradle/MainActivity.java/build.graddle
But for now I'm run in to this issue:
screen
Also please note that I have MainActivity.java instead MainApplication.java as described in docs.

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

Please try adding this line to build.gradle (Module:app), see if it works

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.facebook.react:react-native:+'
+   compile 'com.squareup.okhttp3:okhttp:3.4.1'                                                                                            
}

@Arkanine
Copy link
Author

The same((

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

Can you see react-native-fetch-blob project in the file tree now? If you can, add

compile 'com.squareup.okhttp3:okhttp:3.4.1'

To build.gradle(Module:react-native-fetch-blob) dependencies block.
2016-07-21 6 13 00

@Arkanine
Copy link
Author

Thanks @wkh237!
For now module works fine.

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

Phew! So great to hear that!! I think the package missed OkHttp dependency after we change Network module to OkHttp, I will fixe it and publish a new version : )

@cubbuk
Copy link

cubbuk commented Jul 21, 2016

I am having the same error, using react-native 0.27, and the version of library is 0.7.2. Here is my settings.gradle file:
image

I also added compile 'com.squareup.okhttp3:okhttp:3.4.1' to build.gradle under app directory. Lastly I added new RNFetchBlobPackage(), to MainActivity.

The error I am getting is:

* What went wrong:
A problem occurred configuring project ':app'.
> Cannot evaluate module react-native-fetch-blob : Configuration with name 'default' not found.

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

Hi @cubbuk , This error usually means that the path in settings.gradle point to a folder that does not contains a build.gradle file, could you please see if the relative folder is correct ?

wkh237 added a commit that referenced this issue Jul 21, 2016
@cubbuk
Copy link

cubbuk commented Jul 21, 2016

This is the path all my other dependencies are residing on. And when I check node_modules folder the library is there, and the build.gradle file is residing at the pointed directory. Have any idea?

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

@cubbuk I think this problem might related to Gradle, could you tell me what's your gradle version ?

EDIT

Could you try replacing build.gradle inside node_modules/react-native-fetch-blob with this ?


buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.3'
    }
}

apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    lintOptions {
        abortOnError false
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile "com.facebook.react:react-native:+"
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
}

@cubbuk
Copy link

cubbuk commented Jul 21, 2016

It is 1.5, I see that this library uses 2.0. Could it be because of it?

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

@cubbuk it might be the problem, could you try changing the build.gradle as I mentioned above and see if that works? Thank you 😭

@cubbuk
Copy link

cubbuk commented Jul 21, 2016

I made it same with the library, but the problem still occurs, any other ideas =(

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

Okay .. perhaps we need more logs .. try gradlew.bat --debug clean buildPlugin and there will be some detailed error message.

@cubbuk
Copy link

cubbuk commented Jul 21, 2016

Here is the result, couldn't figure out anything specific?

Evaluating project ':react-native-fetch-blob' using build file '/home/mehmet/_development/Projects/my_app/android/ ../node_modules/react-native-fetch-blob/android/build.gradle'.
17:27:59.246 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 0.001 secs
17:27:59.248 [ERROR] [org.gradle.BuildExceptionReporter] 
17:27:59.248 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
17:27:59.248 [ERROR] [org.gradle.BuildExceptionReporter] 
17:27:59.248 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
17:27:59.248 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred configuring project ':app'.
17:27:59.248 [ERROR] [org.gradle.BuildExceptionReporter] > Cannot evaluate module react-native-fetch-blob : Configuration with name 'default' not found.
17:27:59.248 [ERROR] [org.gradle.BuildExceptionReporter] 
17:27:59.248 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
17:27:59.249 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
17:27:59.249 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:79)
17:27:59.249 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:74)
17:27:59.249 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:61)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:510)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:90)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:47)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLauncher.java:125)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.Factories$1.create(Factories.java:22)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:122)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:48)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
17:27:59.250 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.util.Swapper.swap(Swapper.java:38)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.UnknownProjectException: Cannot evaluate module react-native-fetch-blob : Configuration with name 'default' not found.
17:27:59.251 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.DependencyManager.ensureConfigured(DependencyManager.java:728)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.DependencyManager.resolveDependencyForConfig(DependencyManager.java:240)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.DependencyManager.resolveDependencies(DependencyManager.java:139)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.TaskManager.resolveDependencies(TaskManager.java:350)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.VariantManager$9.call(VariantManager.java:597)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.VariantManager$9.call(VariantManager.java:594)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.profile.SpanRecorders.record(SpanRecorders.java:51)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.VariantManager.createVariantData(VariantManager.java:593)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.VariantManager.createVariantDataForProductFlavors(VariantManager.java:750)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.VariantManager.populateVariantDataList(VariantManager.java:459)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.VariantManager$1.call(VariantManager.java:263)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.VariantManager$1.call(VariantManager.java:260)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:259)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.BasePlugin$12.call(BasePlugin.java:651)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.BasePlugin$12.call(BasePlugin.java:648)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:647)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:566)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:563)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:562)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:559)
17:27:59.252 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:93)
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:82)
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        at com.sun.proxy.$Proxy11.afterEvaluate(Unknown Source)
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:67)
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        ... 52 more
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.artifacts.UnknownConfigurationException: Configuration with name 'default' not found.
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.createNotFoundException(DefaultConfigurationContainer.java:88)
17:27:59.253 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.DefaultNamedDomainObjectCollection.getByName(DefaultNamedDomainObjectCollection.java:210)
17:27:59.254 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.getByName(DefaultConfigurationContainer.java:78)
17:27:59.254 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.getByName(DefaultConfigurationContainer.java:36)
17:27:59.254 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency.getProjectConfiguration(DefaultProjectDependency.java:69)
17:27:59.254 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency_Decorated.getProjectConfiguration(Unknown Source)
17:27:59.254 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.DependencyManager.ensureConfigured(DependencyManager.java:726)
17:27:59.254 [ERROR] [org.gradle.BuildExceptionReporter]        ... 87 more
17:27:59.254 [ERROR] [org.gradle.BuildExceptionReporter] 
17:27:59.254 [LIFECYCLE] [org.gradle.BuildResultLogger] 
17:27:59.254 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
17:27:59.254 [LIFECYCLE] [org.gradle.BuildResultLogger] 

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

I have no idea about this now, I'll use my ubuntu box try to reproduce this problem ..

@cubbuk
Copy link

cubbuk commented Jul 21, 2016

Thanks a lot, my main problem is that I am trying to upload videos and I can upload video files on the phone if they are around 5 MB, but for videos larger than 10 MB I am getting a File Descriptor closed error, and trying to find a solution for this. I hope this library will help me achieve that. Thanks again.

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

No problem, I'll try to figure out what's going on.

@wkh237
Copy link
Owner

wkh237 commented Jul 21, 2016

@cubbuk By the way , did you try to open the project by Android Studio ? If you have Android Studio, you might try the step above.

@cubbuk
Copy link

cubbuk commented Jul 22, 2016

I applied what you told and worked on Android Studio, removed the dependency then manually added again to settings file and I achieved running the project; however this time I am getting undefined is not an object RNFetchBlob.DocumentDir...' error. I checked issue #51 but as I am using react 0.27 I couldn't figure out what to do, I havenew RNFetchBlobPackage()` in getPackages() too. Any idea?

@wkh237
Copy link
Owner

wkh237 commented Jul 22, 2016

Hi @cubbuk , that looks like RNFetchBlob not got linked, RNFetchBlob is undefined. Does the react-native-fetch-blob project correctly loaded ? That should look like this.

2016-07-22 9 39 08

@wkh237
Copy link
Owner

wkh237 commented Jul 23, 2016

@cubbuk , I somehow figured out the problem might caused by the project's react-native version. Because we're using OkHttp3 in 0.7.0 and react-native use OkHttp2 in pre 0.27 versions, it we manually add OkHttp3 dependency that will result in app crash or build failed. You may need to try upgrading your application by command

$ react-native upgrade

and install latest react-native-fetch-blob which I published today.

$ npm install --save react-native-fetch-blob
$ rnpm link

sometimes rnpm add duplicate new RNFetchBlobPackage() in MainApplication.java, be sure it doesn't. Also, you have to remove the OkHttp dependencies you added in build.gralde files. After thing got finished, try if it works now, hopefully this can solve the problem, Thank you !

@cubbuk
Copy link

cubbuk commented Jul 25, 2016

@wkh237 thanks for detailed explanation, but after react-native upgrade command I am still getting the error:

> Cannot evaluate module react-native-fetch-blob : Configuration with name 'default' not found.

One thing I noticed is I am using other libraries too and when I check them from Android Studio, the location they are located at is under node_modules directory of my application, whereas for this library it is looking under android directory and it creates a directory named "../node_modules` which seems wrong. You can see it from the screenshot:

project_structure

And here is my settings.gradle content:

settings gradle

Does that make any sense to you?

Btw thanks a lot for the effort anyway, really appreciated.

@wkh237
Copy link
Owner

wkh237 commented Jul 25, 2016

@cubbuk , I've noticed that there's an extra white space before RNFetchBlob path " ../node_modules/" does it make difference if you remove it?

@cubbuk
Copy link

cubbuk commented Jul 25, 2016

@wkh237 it worked, I didn't even need to any upgrade at all, the reason was the typo =) But after deleting node_modules and re-install averything it started giving error for okhttp3, I guess this is related to react-native version 0.27, because after running upgrade command, the below error is fixed:

/home/mehmet/_development/Projects/sikayet-var-mobil/node_modules/react-native-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java:21: error: package okhttp3 does not exist
import okhttp3.MediaType;
              ^
/home/mehmet/_development/Projects/sikayet-var-mobil/node_modules/react-native-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java:22: error: package okhttp3 does not exist
import okhttp3.RequestBody;
              ^
/home/mehmet/_development/Projects/sikayet-var-mobil/node_modules/react-native-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java:32: error: cannot find symbol
public class RNFetchBlobBody extends RequestBody{
                                     ^

Thanks a lot, I will try out uploading from camera roll and so on now.

@wkh237
Copy link
Owner

wkh237 commented Jul 25, 2016

Great ! Well, In order to find the root cause of this problem, I've tested this module on many environments and also changed the rnpm link script. I'm think that except 0.27, most of versions should work fine on 0.7.5 now.

@cubbuk
Copy link

cubbuk commented Jul 25, 2016

I was able to run it with 0.27.2 after upgrading react-native scripts. Thanks for the help =)

@wkh237
Copy link
Owner

wkh237 commented Jul 26, 2016

You're welcome =)

@wkh237 wkh237 closed this as completed Jul 26, 2016
@sulliwane
Copy link

RN 0.30 with react-native-fetch-blob ^0.8.2, I also had a white space before " ../node_modules/" in my settings.gradle file. After removing, I can run react-native run-android without problem.

ieschalier pushed a commit to ieschalier/react-native-fetch-blob that referenced this issue Jun 26, 2018
Bug Fix: getExternalFilesDir null check
julian-becker pushed a commit to julian-becker/react-native-fetch-blob that referenced this issue Mar 30, 2022
* Media store support

fixes wkh237#95
fixes wkh237#62
fixes wkh237#100
fixes wkh237#91
Merge remote-tracking branch 'origin/develop'
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

4 participants