扑不更新android许可证

时间:2020-04-04 14:45:02

标签: android flutter

当我打扑医生时,我得到以下回应。

  public void onSensorChanged(SensorEvent event) {

    deltaX = Math.abs(lastX - event.values[0]);
    deltaY = Math.abs(lastY - event.values[1]);


    deltaX = deltaX * 10;
    deltaY = deltaY * 10;


    if(deltaX > 2 && deltaY > 2){
      sendMSG((int)deltaX +"&"+(int)deltaY +"\n");
      Log.d("Velocity", "X + Y Values :: " + deltaX + deltaY);

    }

  }

所以我跑了扑医生--android-licenses。接受许可证后,这是我的答复

[✓] Flutter (Channel stable, v1.9.1, on Linux, locale en_US.UTF-8)
    • Flutter version 1.9.1 at /home/farhan/src/flutter
    • Framework revision c382b8e990 (8 months ago), 2019-08-18 15:22:36 -0400
    • Engine revision 5540684152
    • Dart version 2.5.0


[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /home/farhan/src/sdk-tools-linux-4333796
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /home/farhan/src/sdk-tools-linux-4333796
    • ANDROID_SDK_ROOT = /home/farhan/src/sdk-tools-linux-4333796
    • Java binary at: /usr/lib/jvm/java-8-openjdk-amd64/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.0 (API 24) (emulator)

! Doctor found issues in 2 categories.

尝试扑扑医生--android-licenses,并得到相同的响应

Accept? (y/N): y
All SDK package licenses accepted

这是什么问题?

1 个答案:

答案 0 :(得分:0)

可以先安装Android Studio,然后再依次单击工具> SDK管理器> Android SDK> SDK平台并安装Platform android-28

如果问题解决了,那就好,否则 做这个 完成此操作后,打开代码编辑器的终端并输入flutter doctor --android-license,然后继续按“ y”接受许可证。