Cause: path may not be null or empty string. path=''

14,738

You provided the keystore path is "". Check gradle.properties file it have this RELEASE_STORE_FILE="". "" will be replaced by your keystore path. If you don't need now then simply remove those lines and check.

Share:
14,738
Keyur Patel
Author by

Keyur Patel

Updated on June 05, 2022

Comments

  • Keyur Patel
    Keyur Patel about 2 years

    I am trying to open linphone-android library but I am getting this error

    java.lang.IllegalArgumentException: path may not be null or empty string. path=''
        at org.gradle.api.internal.file.AbstractBaseDirFileResolver.doResolve(AbstractBaseDirFileResolver.java:65)
        at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:85)
        at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:67)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:226)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:143)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:88)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:203)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:112)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:88)
        at org.gradle.api.internal.file.CompositeFileCollection$1.visitContents(CompositeFileCollection.java:111)
        at org.gradle.api.internal.file.CompositeFileTree$FilteredFileTree.visitContents(CompositeFileTree.java:114)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveNested(DefaultFileCollectionResolveContext.java:152)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:115)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections(DefaultFileCollectionResolveContext.java:95)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileCollectionConverter.convertInto(DefaultFileCollectionResolveContext.java:172)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:112)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections(DefaultFileCollectionResolveContext.java:95)
        at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollections(CompositeFileCollection.java:172)
        at org.gradle.api.internal.file.CompositeFileCollection.isEmpty(CompositeFileCollection.java:79)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:60)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:596)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.lang.Thread.run(Thread.java:745)
    

    any help would be highly appreciated.

    Thank you in advance.

    https://github.com/BelledonneCommunications/linphone-android

  • Keyur Patel
    Keyur Patel almost 6 years
    what is default value of RELEASE_STORE_FILE
  • Faysal Ahmed
    Faysal Ahmed almost 6 years
    There is not a default path for this. During debugging you can remove those lines. When you want to create signed APK then you need to create a keystore file. When you have the file then add aging those lines and set the path of that keystore file.
  • Keyur Patel
    Keyur Patel almost 6 years
    if i remove this line from gradle.properties in gradel i get this error Could not get unknown property 'RELEASE_STORE_FILE' for SigningConfig_Decorated{name=release, storeFile=null, storePassword=null, keyAlias=null, keyPassword=null, storeType=null, v1SigningEnabled=true, v2SigningEnabled=true} of type com.android.build.gradle.internal.dsl.SigningConfig.
  • Faysal Ahmed
    Faysal Ahmed almost 6 years
    I think the keywords are linked with other places. Please keep those lines and generate a keystore file for this and set the path.
  • Keyur Patel
    Keyur Patel almost 6 years
    without a first clean gradle signed apk not generating
  • Faysal Ahmed
    Faysal Ahmed almost 6 years
    Create e new project and run first. Then create a keystore file and add that file on your current project. Also update the path.
  • Khyati Chitroda
    Khyati Chitroda over 5 years
    I had set key store path but still getting same error.
  • Khyati Chitroda
    Khyati Chitroda over 5 years
    I am getting error "Cause: path may not be null or empty string. path=''" when I am importing the downloaded project from git.
  • Faysal Ahmed
    Faysal Ahmed over 5 years
    Would you please share the git repository url?
  • Khyati Chitroda
    Khyati Chitroda over 5 years
    I have downloaded the project from this link: github.com/BelledonneCommunications/…,
  • Khyati Chitroda
    Khyati Chitroda over 5 years
    RELEASE_STORE_FILE="D:\\Demos\\linphone-android-master\\keys‌​tore.jks" RELEASE_STORE_PASSWORD=1234 RELEASE_KEY_ALIAS=google RELEASE_KEY_PASSWORD=1234 in gradle.property file
  • Faysal Ahmed
    Faysal Ahmed over 5 years
    RELEASE_STORE_FILE="D:\\Demos\\linphone-android-master\\keys‌​tore.jks" not a proper way. This setting is optional you can try to remove and run again.
  • Faysal Ahmed
    Faysal Ahmed over 5 years
    Or follow this instruction 1. Place the my-release-key.keystore file under the android/app directory in your project folder. 2. Edit the file ~/.gradle/gradle.properties or android/gradle.properties, and add the following (replace ***** with the correct keystore password, alias and key password), MYAPP_RELEASE_STORE_FILE=my-release-key.jks MYAPP_RELEASE_KEY_ALIAS=my-key-alias
  • Khyati Chitroda
    Khyati Chitroda over 5 years
    Faysal I have also tried 2nd option still same result. RELEASE_STORE_FILE="appdemo.keystore" RELEASE_STORE_PASSWORD=1234 RELEASE_KEY_ALIAS=google RELEASE_KEY_PASSWORD=1234