Tau: Compilation errors (ver 1.8.0)

Created on 10 Jan 2020  Â·  10Comments  Â·  Source: Canardoux/tau

Library/Flutter/.pub-cache/hosted/pub.dartlang.org/flutter_sound-1.9.0/android/src/main/java/com/dooboolab/fluttersound/FlutterSoundPlugin.java:12: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
Library/Flutter/.pub-cache/hosted/pub.dartlang.org/flutter_sound-1.9.0/android/src/main/java/com/dooboolab/fluttersound/FlutterSoundPlugin.java:44: error: cannot find symbol
ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.RECORD_AUDIO,}, 0);
^
symbol: variable ActivityCompat
location: class sdkCompat
2 errors

FAILURE: Build failed with an exception.

Most helpful comment

Our plugin wasn't androidx compatible. I've bump up version to 2.0.0 to ensure androidx compatibility to users. Please use 2.0.0 if you are in androidx.

All 10 comments

I'm having the same issue

Is this happening in 1.9.0?

Yes, also happening with 1.9.0

On Sat, Jan 11, 2020, 6:36 AM Hyo Chan Jang notifications@github.com
wrote:

Is this happening in 1.9.0?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/dooboolab/flutter_sound/issues/190?email_source=notifications&email_token=ABQTYFLPSYRKRHJJMA7HDKLQ5G4OFA5CNFSM4KFOF5B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWBBSQ#issuecomment-573313226,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABQTYFMT2WKNJXSIIDDGWFLQ5G4OFANCNFSM4KFOF5BQ
.

Same here. Incompatibility with AndroidX. Version 1.9.0

Same issue here. Flutter_sound: ^1.9.0
Errors:

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
/Users/matt/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_sound-1.9.0/android/src/main/java/com/dooboolab/fluttersound/FlutterSoundPlugin.java:12: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
                             ^
  symbol:   class ActivityCompat
  location: package android.support.v4.app
/Users/matt/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_sound-1.9.0/android/src/main/java/com/dooboolab/fluttersound/FlutterSoundPlugin.java:44: error: cannot find symbol
        ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.RECORD_AUDIO,}, 0);
        ^
  symbol:   variable ActivityCompat
  location: class sdkCompat
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_sound:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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 4s
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_sound...
Running Gradle task 'assembleAarRelease'...


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'flutter_sound'.
> 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/matt/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_sound-1.9.0/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 884ms

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

Our plugin wasn't androidx compatible. I've bump up version to 2.0.0 to ensure androidx compatibility to users. Please use 2.0.0 if you are in androidx.

Hi @hyochan,
I'm using 2.0.0 and I'm in androidx but I get this error.

/.pub-cache/hosted/pub.dartlang.org/flutter_sound-2.0.0/android/src/main/java/com/dooboolab/fluttersound/FlutterSoundPlugin.java:12: error: package androidx.core.app does not exist import androidx.core.app.ActivityCompat; ^ /.pub-cache/hosted/pub.dartlang.org/flutter_sound-2.0.0/android/src/main/java/com/dooboolab/fluttersound/FlutterSoundPlugin.java:44: error: cannot find symbol ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.RECORD_AUDIO,}, 0); ^ symbol: variable ActivityCompat location: class sdkCompat 2 errors

Same issue, latest plugin version and android, and flutter versions and android version on the phone

@DyaryRaoof It was 2 weeks ago that wrote the post but as far as I remember it was related to my Gradle and Gradle plugin version. I needed to downgrade them to:

  • Gradle 4.10.2
  • Gradle plugin 3.3.2

Our plugin wasn't androidx compatible. I've bump up version to 2.0.0 to ensure androidx compatibility to users. Please use 2.0.0 if you are in androidx.

Yeah this worked Thanx!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

satyajitghana picture satyajitghana  Â·  3Comments

Larpoux picture Larpoux  Â·  4Comments

felixjunghans picture felixjunghans  Â·  4Comments

TharinduNM picture TharinduNM  Â·  6Comments

java-james picture java-james  Â·  3Comments