Skip to content
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

getting error on android #49

Closed
aigic opened this issue Jan 11, 2019 · 16 comments
Closed

getting error on android #49

aigic opened this issue Jan 11, 2019 · 16 comments

Comments

@aigic
Copy link

aigic commented Jan 11, 2019

Hi, I am using v2.2.5 and when I try to run my code I get error:(even when I only add the package pubspec.yaml and don't import that in code)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  Output:  C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:956: error: resource android:attr/fontVariationSettings not found.
  C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:957: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

  Command: C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\451c100d8bf9a65f95ef6aa052d39f8f\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
          C:\Users\Dell\AppData\Local\Android\Sdk\platforms\android-27\android.jar\
          --manifest\
          C:\Projects\Hamayesh\hamayesh\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
          -o\
          C:\Projects\Hamayesh\hamayesh\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
          -R\
          @C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
          --auto-add-overlay\
          --java\
          C:\Projects\Hamayesh\hamayesh\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
          --custom-package\
          com.example.hamayesh\
          -0\
          apk\
          --output-text-symbols\
          C:\Projects\Hamayesh\hamayesh\build\app\intermediates\symbols\debug\R.txt\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
  Output:  C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\appcompat-1.0.2.aar\ecd6e2b9bb4b92916609cb0c2e58164c\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.

  C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.

  C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\core-1.0.1.aar\00977c9949f24ec591bbf642eb5a1280\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.

  C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\core-1.0.1.aar\00977c9949f24ec591bbf642eb5a1280\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.

  error: failed linking references.
  Command: C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\451c100d8bf9a65f95ef6aa052d39f8f\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
          C:\Users\Dell\AppData\Local\Android\Sdk\platforms\android-27\android.jar\
          --manifest\
          C:\Projects\Hamayesh\hamayesh\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
          -o\
          C:\Projects\Hamayesh\hamayesh\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
          -R\
          @C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
          --auto-add-overlay\
          --java\
          C:\Projects\Hamayesh\hamayesh\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
          --custom-package\
          com.example.hamayesh\
          -0\
          apk\
          --output-text-symbols\
          C:\Projects\Hamayesh\hamayesh\build\app\intermediates\symbols\debug\R.txt\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

* 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
Finished with error: Gradle task assembleDebug failed with exit code 1
@JamesChenX
Copy link

I solve this problem only by using the version 2.1.5. I have tried other ways, but they all don't solve this problem.

@bgetsug
Copy link
Contributor

bgetsug commented Jan 12, 2019

This also caught me by surprise after upgrading. v2.2.3 works for me.

I do not think this plugin should use the AndroidX library (163a6be#diff-7ae5a9093507568eabbf35c3b0665732). There are a number of outstanding issues with Flutter and AndroidX, for example: flutter/flutter#23586

@alanppxmw
Copy link

v2.2.3 ok.

@ponnamkarthik
Copy link
Owner

issue is because of migrating libraries to androidx will fix it soon or i will try to revert it back.

@Boehrsi
Copy link
Contributor

Boehrsi commented Jan 12, 2019

Does it work for you @aigic @JamesChenX if you use compilesdkversion 28 in the Android build.gradle file in your Flutter project? I'm currently using that setup together with the latest FlutterToast
version and it's working quite well. @ponnamkarthik sorry I wasn't aware of Flutter vs. AndroidX problems when committing the PR (#45).

@ahaboubi
Copy link

I'm using compilesdkversion 28 with v 2.25 and it isn't working. Going back to v 2.2.3 works for me.

@pojoba02
Copy link

@ponnamkarthik, facing the same issue

@rtokun
Copy link

rtokun commented Jan 12, 2019

Same for me here basically on flutter starter project (Android Studio), even on 2.2.3.
Compile/Target SDKs 27

@AlexTeamX
Copy link
Contributor

就这个问题,我找了4个小时!!!

@ponnamkarthik
Copy link
Owner

ponnamkarthik commented Jan 13, 2019

@Boehrsi the issue is with dependencies we cannot combine androidx and normal previous dependencies

as a temporary fix use v2.2.3

@ponnamkarthik
Copy link
Owner

Please check v2.2.6

@ahaboubi
Copy link

2.2.6 works. Thanks!

@cikichen
Copy link

cikichen commented Jan 14, 2019

import android.support.v4.content.ContextCompat;

no implementation

resolve:

remove

android.useAndroidX=true

android.enableJetifier=true

@DFilipeS
Copy link

Still having the same issue on 2.2.6.

@Boehrsi
Copy link
Contributor

Boehrsi commented Jan 24, 2019

Still having the same issue on 2.2.6.

@DFilipeS are you using androidX components somewhere in you app? If yes, you have to use 2.2.5.

@ponnamkarthik
Copy link
Owner

Hope its fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests