如何解决flutter Google maps eroor:找不到providerinstaller的本地模块描述符类
我的项目在三星 Galaxy 平板电脑 A5 上运行良好。我尝试将我的项目用于另一款三星平板电脑。它不起作用,因为 android 版本是 3.1。然后我升级了最新的 androide 版本,但我遇到了这个错误。现在,项目不适用于任何设备。我也试过霍尼韦尔的设备,但没有用。
医生 -v
[√] Flutter (Channel master,2.2.0-11.0.pre.103,on Microsoft Windows [Version 10.0.19042.928],locale tr-TR)
• Flutter version 2.2.0-11.0.pre.103 at C:\src\flutter_windows_1.22.4-stable\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f0c9710493 (2 days ago),2021-04-13 20:29:40 -0500
• Engine revision 04cd0db032
• Dart version 2.13.0 (build 2.13.0-232.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\sdk
• Platform android-30,build-tools 30.0.2
• ANDROID_SDK_ROOT = C:\sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.55.2)
• VS Code at C:\Users\mehmet\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.21.0
[√] Connected device (3 available)
• SM P550 (mobile) • 9393c84e1050b21d • android-arm • Android 7.1.1 (API 25)
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.72
• Edge (web) • edge • web-javascript • Microsoft Edge 89.0.774.76
• No issues found!
build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 30
buildToolsVersion "29.0.2"
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.firebase"
minSdkVersion 24
targetSdkVersion 30
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now,so `flutter run --release` works.
signingConfig signingConfigs.debug
//önceden proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro' yoktu yeni eklendi ve signingConfig signingConfigs.debug idi ve useProguard true yoktu
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:1.0.3'
implementation platform('com.google.firebase:firebase-bom:27.0.0')
implementation 'com.google.firebase:firebase-analytics'
//implementation 'com.google.android.gms:play-services-location:18.0.0'
//implementation 'com.google.android.gms:play-services-ads:20.0.0'
//implementation 'com.google.android.gms:play-services:12.0.1'
}
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.firebase">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:label="firebase"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAQiGmvj3eBaoeOCRiGnGb26FTZbGqoU2M"
/>
<activity
android:name=".MainActivity"
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">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that,this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame,then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<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>
<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>
<!-- 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>
三星 Galaxy Tab a5 上的错误:
W/DynamiteModule(14840): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(14840): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(14840): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
D/ConnectivityManager(14840): requestNetwork; CallingUid : 10155,CallingPid : 14840
V/NativeCrypto(14840): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 287 native methods...
I/ProviderInstaller(14840): Installed default security provider GmsCore_OpenSSL
W/art (14840): Before Android 4.1,method double java.util.concurrent.ThreadLocalRandom.internalNextDouble(double,double) would have incorrectly overridden the package-private method in java.util.Random
W/art (14840): Before Android 4.1,method int java.util.concurrent.ThreadLocalRandom.internalNextInt(int,int) would have incorrectly overridden the package-private method in java.util.Random
W/art (14840): Before Android 4.1,method long java.util.concurrent.ThreadLocalRandom.internalNextLong(long,long) would have incorrectly overridden the package-private method in java.util.Random
D/ConnectivityManager(14840): requestNetwork; CallingUid : 10155,CallingPid : 14840
I/zzbz (14840): Making Creator dynamically
I/DynamiteModule(14840): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203112999
I/DynamiteModule(14840): Selected remote version of com.google.android.gms.maps_dynamite,version >= 203112999
V/DynamiteModule(14840): Dynamite loader version >= 2,using loadModule2NoCrashUtils
W/System (14840): ClassLoader referenced unknown path: /data/user_de/0/com.google.android.gms/app_chimera/m/00000006/n/armeabi-v7a
W/System (14840): ClassLoader referenced unknown path: /data/user_de/0/com.google.android.gms/app_chimera/m/00000006/n/armeabi
I/Google Maps Android API(14840): Google Play services client version: 12451000
I/Google Maps Android API(14840): Google Play services package version: 211213015
它在霍尼韦尔设备上的错误。
W/System ( 660): Ignoring header X-Firebase-Locale because its value was null.
W/DynamiteModule( 660): Local module descriptor class for providerinstaller not found.
I/DynamiteModule( 660): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller( 660): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
2
I/xample.firebas( 660): The ClassLoaderContext is a special shared library.
V/NativeCrypto( 660): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 287 native methods...
W/xample.firebas( 660): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (greylist,reflection,allowed)
I/ProviderInstaller( 660): Installed default security provider GmsCore_OpenSSL
W/xample.firebas( 660): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,linking,allowed)
W/xample.firebas( 660): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api,allowed)
W/xample.firebas( 660): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Lsun/misc/Unsafe;->allocateInstance(Ljava/lang/Class;)Ljava/lang/Object; (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Llibcore/io/Memory;->peekLong(JZ)J (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Llibcore/io/Memory;->pokeLong(JJZ)V (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Llibcore/io/Memory;->pokeInt(JIZ)V (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Llibcore/io/Memory;->peekInt(JZ)I (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Llibcore/io/Memory;->pokeByte(JB)V (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Llibcore/io/Memory;->peekByte(J)B (greylist,allowed)
W/xample.firebas( 660): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,allowed)
I/zzbz ( 660): Making Creator dynamically
I/DynamiteModule( 660): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203112999
I/DynamiteModule( 660): Selected remote version of com.google.android.gms.maps_dynamite,version >= 203112999
V/DynamiteModule( 660): Dynamite loader version >= 2,using loadModule2NoCrashUtils
W/Gralloc3( 660): allocator 3.x is not supported
I/DynamiteLoaderV2Impl( 660): [71] Mapsdynamite
I/Google Maps Android API( 660): Google Play services client version: 12451000
I/Google Maps Android API( 660): Google Play services package version: 210915038
W/xample.firebas( 660): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,allowed)
I/DynamiteLoaderV2Impl( 660): [71] Googlecertificates
W/xample.firebas( 660): ClassLoaderContext type mismatch. expected=PCL,found=DLC (PCL[] | DLC[];PCL[/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk*2265824598:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classes2.dex*1844131731:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classes3.dex*4204799996:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classes4.dex*497396354:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classes5.dex*2323125583:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classes6.dex*2029835607:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classes7.dex*1380660130:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classes8.dex*168506687:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classes9.dex*779558648:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classes10.dex*3951521473:/data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk!classe
W/xample.firebas( 660): Found duplicate classes,falling back to extracting from APK : /data/user_de/0/com.google.android.gms/app_chimera/m/0000000e/GoogleCertificates.apk
W/xample.firebas( 660): NOTE: This wastes RAM and hurts startup performance.
W/xample.firebas( 660): Found duplicated class when checking oat files: 'Landroid/support/v4/app/RemoteActionCompatParcelizer;' in /data/app/com.example.firebase-fC2M-WKgYfYUSqPsGwG2Ig==/base.apk and /data/user_de/0/com.google.android.gms/app_chimera/m/0000000e/GoogleCertificates.apk
W/xample.firebas( 660):
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。