Skip to content

Regarding the issue of errors when importing Java APIs due to differences in syntax between Java and Python #3110

Answered by mhsmith
mymane1433223 asked this question in Q&A
Discussion options

You must be logged in to vote

This is covered in the Chaquopy documentation:

Nested and inner classes cannot be imported directly. Instead, import the outer class, and access the nested class as an attribute, e.g. Outer.Nested.

In this case that would be:

from android.os import Build
Build.Partition

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mymane1433223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants