transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
640 stars 237 forks source link

license validation failure #1154

Closed GoStaRoff closed 11 months ago

GoStaRoff commented 11 months ago

Expected Behavior

App starts on android emulator in debug mode without api key in AndroidManifest.xml

Actual Behavior

Crashing after plugin init.

Знімок екрана 2023-10-11 о 05 54 38

Steps to Reproduce

Can't describe

Context

All instructions of setup was read and compared. Files was compared with the example.

Debug logs

Logs ``` E/AndroidRuntime( 4076): FATAL EXCEPTION: pool-7-thread-2 E/AndroidRuntime( 4076): Process: orienteering.ar_athlete.ar_athlete, PID: 4076 E/AndroidRuntime( 4076): java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in /data/app/~~F_j6cxfb62EDe22MI1eIwA==/orienteering.ar_athlete.ar_athlete-agWEGB99pOw_qjpL_yfYZQ==/base.apk) E/AndroidRuntime( 4076): at com.transistorsoft.xms.g.location.FusedLocationProviderClient.removeLocationUpdates(Unknown Source:50) E/AndroidRuntime( 4076): at com.transistorsoft.locationmanager.location.TSLocationManager.d(Unknown Source:40) E/AndroidRuntime( 4076): at com.transistorsoft.locationmanager.location.TSLocationManager.stopUpdatingLocation(Unknown Source:0) E/AndroidRuntime( 4076): at com.transistorsoft.locationmanager.location.TSLocationManager.stop(Unknown Source:0) E/AndroidRuntime( 4076): at com.transistorsoft.locationmanager.service.TrackingService.stop(Unknown Source:83) E/AndroidRuntime( 4076): at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation.c(Unknown Source:2) E/AndroidRuntime( 4076): at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation.$r8$lambda$oSDeWXxQl1jmikdjYQwff60damw(Unknown Source:0) E/AndroidRuntime( 4076): at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation$$ExternalSyntheticLambda1.run(Unknown Source:4) E/AndroidRuntime( 4076): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) E/AndroidRuntime( 4076): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) E/AndroidRuntime( 4076): at java.lang.Thread.run(Thread.java:1012) I/FA ( 4076): Application backgrounded at: timestamp_millis: 1697068491396 I/Process ( 4076): Sending signal. PID: 4076 SIG: 9 Lost connection to device. ```

AndroidManifest.xml :

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="MY_PACKAGE_NAME">
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

    <uses-permission android:name="android.permission.WAKE_LOCK"/>

    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
    <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

    <uses-permission android:minSdkVersion="34" android:name="android.permission.USE_EXACT_ALARM" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <queries>
        <!-- If your app opens https URLs -->
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="https" />
        </intent>
        <!-- If your app makes calls -->
        <intent>
            <action android:name="android.intent.action.DIAL" />
            <data android:scheme="tel" />
        </intent>
        <!-- If your app emails -->
        <intent>
            <action android:name="android.intent.action.SEND" />
            <data android:mimeType="*/*" />
        </intent>
    </queries>
   <application
        tools:replace="android:label"
        android:label="APP_LABEL"
        android:icon="@mipmap/ic_launcher"
       android:usesCleartextTraffic="true">
       <meta-data android:name="com.google.android.geo.API_KEY"
           android:value="MY_GOOGLE_API_KEY"/>
       <meta-data android:name="com.facebook.sdk.ApplicationId"
           android:value="@string/facebook_app_id"/>

       <activity android:name="com.facebook.FacebookActivity"
           android:configChanges=
               "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
           android:label="@string/app_name" />
       <activity
           android:name="com.facebook.CustomTabActivity"
           android:exported="true">
           <intent-filter>
               <action android:name="android.intent.action.VIEW" />
               <category android:name="android.intent.category.DEFAULT" />
               <category android:name="android.intent.category.BROWSABLE" />
               <data android:scheme="@string/fb_login_protocol_scheme" />
           </intent-filter>
       </activity>
       <activity
           android:name="com.yalantis.ucrop.UCropActivity"
           android:screenOrientation="portrait"
           android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
        <activity
            android:name=".MainActivity"
            android:exported = "true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <meta-data
              android:name="io.flutter.embedding.android.SplashScreenDrawable"
              android:resource="@drawable/launch_background"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
</manifest>
christocracy commented 11 months ago

Search issues before posting new one. "IncompatibleClassChangeError", this has been posted dozens of times before,

GoStaRoff commented 11 months ago

Thank you very much and sorry. Bad words have been selected for search the issue.