flutter_zoom_plugin icon indicating copy to clipboard operation
flutter_zoom_plugin copied to clipboard

ERROR[Android] Sdk Location not found

Open milzamhibatullah opened this issue 4 years ago • 7 comments

Your Environment

  • Plugin version:
  • Platform: iOS or Android
  • OS version:
  • Device manufacturer / model:
  • Flutter info (flutter doctor):
  • Plugin config:
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale en-ID)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.41.1)
[✓] Connected device (2 available)

• No issues found!

Debug logs

Logs
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     /Users/milzlaps/.gradle/caches/transforms-2/files-2.1/57706c5fc98d3a3ce35c81f0d5d3c506/jetified-mobilertc/AndroidManifest.xml:129:9-133:51: AAPT: error: attribute android:foregroundServiceType not found.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 10s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin flutter_zoom_plugin...
Running Gradle task 'assembleAarRelease'...

Finished with error: The plugin flutter_zoom_plugin could not be built due to the issue above.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'flutter_zoom_plugin'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/milzlaps/Documents/flutter/.pub-cache/git/flutter_zoom_plugin-1647c9e48d2f31da434a777037d949ed3f3391ff/android/local.properties'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

milzamhibatullah avatar Jun 29 '20 09:06 milzamhibatullah

I am getting same error.

sani2608 avatar Aug 01 '20 09:08 sani2608

Have the same error. Flutter doctor is showing no problems

azackmatoff avatar Sep 23 '20 10:09 azackmatoff

Solved issue! Copied my local.properties file from project, and pasted it under main flutter folder, under .pub_cache, under zoom package, under android folder just like in the main project. It worked.

azackmatoff avatar Sep 23 '20 11:09 azackmatoff

@azackmatoff excellent. Did that help everyone?

kevinbayes avatar Oct 04 '20 03:10 kevinbayes

Solved issue! Copied my local.properties file from project, and pasted it under main flutter folder, under .pub_cache, under zoom package, under android folder just like in the main project. It worked.

where are you reffering when you say main flutter folder under .pub-cache . Can you give a screenshot?

sj210 avatar Oct 04 '20 18:10 sj210

Yo también tuve el mismo error cuando trataba de compilar mi proyecto con Zoom. Buscando en diversos foros encontré la solución, la cual a mí me funciono. Lo que hice fue cambiar mi compileSdkVersion 28 a compileSdkVersion 29 y el targetSdkVersion 28 a targetSdkVersion 29. Les dejo una camtura de pantalla. La ruta del archivo es la siguiente: /tu_proyecto/android/app/build.gradle image

MacaCar96 avatar Oct 28 '20 23:10 MacaCar96

I solved this problem by increasing the min sdk first, and then copy paste the flutter_zoom_plugin: again

AjiSuryawan avatar Mar 25 '21 13:03 AjiSuryawan