teads / TeadsSDK-flutter

Deprecated. Teads SDK Flutter Sample App - Check out an open-source sample of the Teads SDK implementation
Apache License 2.0
3 stars 1 forks source link

Issue in android - Unresolved reference: PLUGIN_VERSION #51

Open narendran1996 opened 2 weeks ago

narendran1996 commented 2 weeks ago

I am facing the issue while running teads example code in android

Below is my 1st error

uses-sdk:minSdkVersion 21 cannot be smaller than version 28 declared in library [:teads_sdk_flutter]

Suggestion: use a compatible library with a minSdk of at most 21, or increase this project's minSdk version to at least 28, or use tools:overrideLibrary="tv.teads.teadssdkflutter.teads_sdk_flutter" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

Flutter Fix ─────────────────────────────────────────────────────────────────────────────────┐ The plugin teads_sdk_flutter requires a higher Android SDK version.
Fix this issue by adding the following to the file
/StudioProjects/teads/android/app/build.gradle:
android {
defaultConfig {
minSdkVersion 28
}
}

Following this change, your app will not be available to users running Android SDKs below 28. │ Consider searching for a version of this plugin that supports these lower versions of the │ Android SDK instead.

narendran1996 commented 2 weeks ago

After changing the minSdkVersion to 28 am getting this error in console

e: /Users/narendran/.pub-cache/hosted/pub.dev/teads_sdk_flutter-1.0.4/android/src/main/kotlin/tv/teads/teadssdkflutter/teads_sdk_flutter/FLTTeads.kt: (60, 38): Unresolved reference: PLUGIN_VERSION

FAILURE: Build failed with an exception.

BUILD FAILED in 6s Error: Gradle task assembleDebug failed with exit code 1

My Version as below

[✓] Flutter (Channel stable, 3.22.2, on macOS 14.1 23B2073 darwin-arm64, locale en-IN) • Flutter version 3.22.2 on channel stable at /Users/narendran/Downloads/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 761747bfc5 (5 months ago), 2024-06-05 22:15:13 +0200 • Engine revision edd8546116 • Dart version 3.4.3 • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) • Android SDK at /Users/narendran/Library/Android/sdk • Platform android-35, build-tools 35.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15F31d • CocoaPods version 1.15.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)

[✓] Connected device (5 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 13 (API 33) (emulator) • iPhone 15 (mobile) • 0835D5D5-7A5E-4A3A-BD74-33B5AB39F758 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.1 23B2073 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.1 23B2073 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 130.0.6723.92 ! Error: Browsing on the local area network for Sri’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources • All expected network resources are available.

• No issues found!