-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jar files can't package to the apk #709
Comments
I am suffering from similar problems. Have you successfully built , android.add_jars by setting path? |
Just modify /root/.buildozer/android/platform/build/dists/zx013/templates/build.tmpl.gradle, android.add_jars will take effect. |
try this PR kivy/python-for-android#1693 to see if it fixes the issue. |
Should be fixed with the PR linked above. Otherwise feel free to re-open with info |
When I use lastest buildozer and lastest build-tools(28.0.2), it auto choose grade to pack. Then I set option android.add_jars in buildozer.spec, it seems not work well. The java class can not found in apk. So I check the code and add line in /root/.buildozer/android/platform/build/dists/zx013/templates/build.tmpl.gradle. And before run 'buildozer android release', I remove /root/.buildozer/android/platform/build/dists/zx013/build. After do this, the jar files can work well. So I think it maybe some mistake in it or I got the wrong way.
That is the build.tmpl.gradle I modify, compile fileTree(dir: 'src/main/libs', include: '.jar') is the line I have added.
dependencies {
compile fileTree(dir: 'src/main/libs', include: '.jar')
{%- for aar in aars %}
compile(name: '{{ aar }}', ext: 'aar')
{%- endfor -%}
{%- if args.depends -%}
{%- for depend in args.depends %}
compile '{{ depend }}'
{%- endfor %}
{%- endif %}
}
The text was updated successfully, but these errors were encountered: