AS-Devs / signalr_flutter

A flutter plugin for .net SignalR client.
https://pub.dev/packages/signalr_flutter
MIT License
19 stars 27 forks source link

Error while building apk #26

Closed Kedar-27 closed 3 years ago

Kedar-27 commented 3 years ago

FAILURE: Build failed with an exception.

mahmoudatef955 commented 3 years ago

Did you solve the problem?

Kedar-27 commented 3 years ago

Did you solve the problem?

Yes, had to rename signalr-client-sdk.jar file 'lib' folder to 'libs'

tech-instacare commented 3 years ago

Did you solve the problem?

Yes, had to rename signalr-client-sdk.jar file 'lib' folder to 'libs'

Can you please explain further steps?

marmar771 commented 3 years ago

Did you solve the problem?

Yes, had to rename signalr-client-sdk.jar file 'lib' folder to 'libs'

Can you please explain further steps?

Hello @tech-instacare

For me worked like this:

go to your local flutter location -> flutter.pub-cache\hosted\pub.dartlang.org\signalr_flutter-0.0.5\android\libs right click on signalr-client-sdk.jar open with WinRAR and then just rename the folder lib to libs

I hope this will help you

wolcy97 commented 3 years ago
  1. Add build.gradle blow lines apply plugin: 'kotlin-android-extensions' android {
    packagingOptions { exclude 'AndroidManifest.xml' exclude 'lib/getLibs.ps1' exclude 'lib/getLibs.sh' exclude 'lib/gson-2.2.2.jar' } }

  2. Change SignalR.kt with new code SignalR.kt Path : flutter/.pub-cache/hosted/pub.dartlang.org/signalr_flutter-0.1.0/android/src/main/kotlin/dev/asdevs/signalr_flutter/SignalR.kt

new Code path : https://raw.githubusercontent.com/AS-Devs/signalr_flutter/master/android/src/main/kotlin/dev/asdevs/signalr_flutter/SignalR.kt

  1. Clean Project
  2. Rebuild