cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in learning how media industry leaders use Dropbox Replay? Register for our webinar here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Specification '\dropbox-sdk-java\generated_stone_source\main\src' must have a .stone extension

Specification '\dropbox-sdk-java\generated_stone_source\main\src' must have a .stone extension

PIXIP
Explorer | Level 4

After importing the dropbox-sdk-java example from the official GitHub into Android Studio I get this building and trying to run it:

 

Specification 'C:\Users\XXX\StudioProjects\dropbox-sdk-java\dropbox-sdk-java\generated_stone_source\main\src' must have a .stone extension.

Execution failed for task ':dropbox-sdk-java:generateStone'.

Process 'command 'python'' finished with non-zero exit value 1

 

Android Studio version is Electric Eel

7 Replies 7

Здравко
Legendary | Level 20

Do you have Python installed at all? 🤔

Greg-DB
Dropbox Staff

[Cross-linking for reference: https://stackoverflow.com/questions/75633261/specification-dropbox-sdk-java-generated-stone-source-m... ]

 

@PIXIP Have you or do you need to make any changes to the Java SDK project? If you don't need to make changes we recommend that you don't build from source. If you don't need to make changes it's much easier to use one of the pre-built releases, e.g., via Maven or Gradle as documented here.

PIXIP
Explorer | Level 4

No need to change anything in the SDK

I literally just cloned it from https://github.com/dropbox/dropbox-sdk-java and then built it and tried to run examples.android on both a default AVD (API 33) and a physical device

Python version is 3.10.10

Здравко
Legendary | Level 20

Hi again @PIXIP,

You just enlightened a bug in Dropbox Java SDK. 😁

Yes, Dropbox rely on deprecated packages for a long time.  Actually since Python3.3, some of the packages used here are designated as deprecated. In Python3.9 those packages are already dropped. 🤷 That's where your error comes from. Let's hope Dropbox developers will fix it soon. In meantime, as a workaround, you can install Python 3.8 and use it. 😉 Make sure that python command exists and points the correct executable (sometimes only python3 exists; create proper link if needed too).

Hope this helps to some extent.

Greg-DB
Dropbox Staff

@PIXIP Thanks for following up with the additional information. In that case, please use the pre-built library, as mentioned here. There's also a note about doing so for the Android example here.

PIXIP
Explorer | Level 4

So I uninstalled Python 3.10.10 and installed 3.8.10

 

This is the build log (with --info command):

C:\Users\XXX\StudioProjects\dropbox-sdk-java-latest\dropbox-sdk-java\stone\stone\cli.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp # pylint: disable=deprecated-module
Traceback (most recent call last):
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\XXX\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\XXX\StudioProjects\dropbox-sdk-java-latest\dropbox-sdk-java\stone\stone\cli.py", line 13, in <module>
import six
ModuleNotFoundError: No module named 'six'
:dropbox-sdk-java:generateStone (Thread[Execution worker Thread 3,5,main]) completed. Took 0.093 secs.
Resolve mutations for :dropbox-sdk-java:processResources (Thread[Execution worker Thread 10,5,main]) started.
Resolve mutations for :dropbox-sdk-java:processResources (Thread[Execution worker Thread 10,5,main]) completed. Took 0.0 secs.
:dropbox-sdk-java:processResources (Thread[Execution worker Thread 8,5,main]) started.

Execution failed for task ':dropbox-sdk-java:generateStone'.
> Process 'command 'python'' finished with non-zero exit value 1

 

 

Здравко
Legendary | Level 20

@Здравко wrote:

...😉 Make sure that python command exists and points the correct executable (sometimes only python3 exists; create proper link if needed too).

Hope this helps to some extent.


@PIXIP, Did you do it? 🤔 What actually happens when you type 'python' in terminal? (just for test) Also can be seen that you miss the 'six' package! Install it. 😉

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    PIXIP Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?