Skip to content

Commit 24d451f

Browse files
committed
Update Android metadata generator
1 parent ed96238 commit 24d451f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

libs/metadata_generators/android_metadata_generator.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import os
22

3+
# Set the classpath to include the android.jar file
4+
# This approach will allow Pyjnius to find the necessary Java classes when
5+
# interacting with the Android SDK from within your Python script
6+
os.environ[
7+
"CLASSPATH"
8+
] = "/Users/owencarey/Library/Android/sdk/platforms/android-33/android.jar"
9+
10+
# Use OpenJDK 8
311
os.environ[
412
"JAVA_HOME"
5-
] = "/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home"
13+
] = "/usr/local/opt/openjdk@8/libexec/openjdk.jdk/Contents/Home"
614

715
from jnius import autoclass
816
import json

0 commit comments

Comments
 (0)