Open omkarpattanaik opened 3 years ago
Have you solved your problem? I'm having an similar error, but for me is Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
It seens to be related to build tools version as you can see on this line Build-tool 31.0.0 is missing DX at /usr/local/lib/android/sdk/build-tools/31.0.0/dx
on my machine it runs at build tool version 29, and looking up in the internet it seens that this version has this problem
Is there a way to change this build tool version? I already have android-minSdkVersion
on my config.xml
`# Workaround to use older build-tools on Github virtual-environments
- run: $ANDROID_SDK_ROOT/tools/bin/sdkmanager --uninstall 'build-tools;31.0.0'
name: Remove build-tools version 31 `
this works in the Fastlane + Github Actions setup that I’m using.
Thank You @kevinboosten
Build-tool 31.0.0 installed in virtual environment was causing this error. Adding your solution worked for me
- name: Uninstall build-tool version 31.0.0
run: $ANDROID_SDK_ROOT/tools/bin/sdkmanager --uninstall 'build-tools;31.0.0'
Also i had to remove
ionic cordova platform add android@latest
uses (cordova-android@10.0.1)
and add
ionic cordova platform add android
uses (cordova-android@9.0.0)
As cordova-android@10.0.1 was also causing app:compileReleaseJavaWithJavac FAILED
Task :app:compileReleaseJavaWithJavac FAILED ^ symbol: class Whitelist location: package org.apache.cordova /home/runner/work/setup-ionic/testapp /platforms/android/app/src/main/java/org/apache/cordova/whitelist/WhitelistPlugin.java:32: error: cannot find symbol private Whitelist allowedNavigations; ^ symbol: class Whitelist location: class org.apache.cordova.whitelist.WhitelistPlugin /home/runner/work/setup-ionic/testapp /platforms/android/app/src/main/java/org/apache/cordova/whitelist/WhitelistPlugin.java:33: error: cannot find symbol
Modified Working Workflow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'adopt' # See 'Supported distributions' for available options
java-version: '8'
- name: Use coturiv/setup-ionic
uses: coturiv/setup-ionic@v1.0.4
- name: Uninstall 31.0.0 Build tool
run: $ANDROID_SDK_ROOT/tools/bin/sdkmanager --uninstall 'build-tools;31.0.0'
- name: Run cordova project tests
run: |
ionic start testapp blank --cordova --type angular --no-link --no-git --no-interactive --confirm
cd testapp
ionic cordova platform add android
ionic cordova build android
If not, open your Android project part in Android Studio to install all necessary tools for Android development under Ionic. It solves my problems
I have the same issue when run 'ionic cordova build android'. The output is as: FAILURE: Build failed with an exception.
Installed Build Tools revision 33.0.0-rc4 is corrupted. Remove and install again using the SDK Manager.
I re-install the Android SDK Build-tools 33.00rc4, does not solve this issue. I then open file ...\platforms\android\build.gradle, it's said "defaultBuildToolsVersion="29.0.2"". After I uninstalling current revision and installing revision 29.0.2 of Android SDK Build-tools, I passed the 'ionic cordova build android'!
I have the same problem but i use flutter in Android studio
How can i do?
Any commnets on this issue ?
I setup Android via command line to avoid Android studio and I setup my ANDROID_HOME
& ANDROID_SDK_ROOT
paths incorrectly. I had them set to C:\Android\cmd-line-tools
but it had to be changed to the parent directory of cmd-line-tools
(C:\Android
). That's all it was.
Hello everyone,
I tried creating an android package using these steps but I am getting error.
Action Error Logs:
From what I could understand from the logs is it could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
So I also tried using this
and
but still I am facing the same error as above.
I also tried creating the same in my local machine and build was successful.
Can someone plz help ?
Thanks you in advance.