javascript - 我成功构建了我的应用程序,但是当我运行它时,它崩溃了,这是我的 logcat 中提示的味精
问题描述
---------- 在 android.app.ActivityThread.installContentProviders(ActivityThread.java:6964) 在 android.app.ActivityThread.handleBindApplication(ActivityThread) 的 android.app.ActivityThread.installProvider(ActivityThread.java:7447) .java:6870) 在 android.app.ActivityThread.access$1600(ActivityThread.java:255) 在 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2106) 在 android.os.Handler.dispatchMessage(Handler.java :107) 在 android.os.Looper.loop(Looper.java:230) 在 android.app.ActivityThread.main(ActivityThread.java:7815) 在 java.lang.reflect.Method.invoke(Native Method) 在 com。 android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:526) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034) 原因:java.lang.IllegalStateException:
******************************************************************************
* Invalid application ID. Follow instructions here: *
* https://googlemobileadssdk.page.link/admob-android-update-manifest *
* to find your app ID. *
******************************************************************************
at com.google.android.gms.internal.ads.zzzt.attachInfo(com.google.android.gms:play-services-ads-lite@@19.7.0:24)
at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(com.google.android.gms:play-services-ads-lite@@19.7.0:3)
at android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
`` <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.dating.app">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:name="com.dating.app.Main.Application"
android:allowBackup="true"
android:icon="@mipmap/flirt_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/flirt_icon"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:icon">
<activity android:name="com.dating.app.Settings.NotificationActivity"></activity>
<activity android:name="com.dating.app.Start.RemindActivity" />
<activity android:name="com.dating.app.Start.StartActivity" />
<activity android:name="com.dating.app.Settings.SupportActivity" />
<activity android:name="com.dating.app.Settings.PasswordActivity" />
<activity android:name="com.dating.app.Settings.EmailActivity" />
<activity android:name="com.dating.app.Settings.AccountActivity" />
<activity android:name="com.dating.app.Settings.ReportActivity" />
<activity android:name="com.dating.app.Profile.ProfileEditActivity" />
<activity android:name="com.dating.app.Main.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.dating.app.Start.LoginActivity" />
<activity android:name="com.dating.app.Start.RegisterActivity" />
<activity android:name="com.dating.app.Message.MessageActivity" />
<activity android:name="com.dating.app.Profile.ProfileActivity" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" />
<activity android:name="com.dating.app.Settings.SettingsActivity" />
<activity android:name="com.dating.app.Settings.PrivacyActivity" />
<activity android:name="com.dating.app.Accounts.AccountsActivity" />
<activity android:name="com.dating.app.Premium.PremiumActivity" />
<service android:name="com.dating.app.Extra.ServiceClass" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="@string/admob_banner_ad_unit_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>
</application>
</manifest>``
apply plugin: 'com.android.application'
android { compileSdkVersion 30 defaultConfig { applicationId "com.dating.app.flirt.chat" minSdkVersion 19 targetSdkVersion 30 versionCode 2 versionName "1.0.1" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
android {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
}
````dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.viewpager:viewpager:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation "com.google.firebase:firebase-core:18.0.2"
implementation 'com.google.firebase:firebase-database:19.6.0'
implementation 'com.google.firebase:firebase-auth:20.0.2'
implementation 'com.google.firebase:firebase-storage:19.2.1'
implementation 'com.google.firebase:firebase-firestore:22.1.0'
implementation 'com.google.firebase:firebase-ads:19.7.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.nabinbhandari.android:permissions:3.8'
implementation 'id.zelory:compressor:2.1.0'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.crystal:crystalrangeseekbar:1.1.3'
implementation 'com.patrickpissurno:ripple-effect:1.3.1'
implementation 'com.github.curioustechizen.android-ago:library:1.4.0'
implementation 'com.firebaseui:firebase-ui-firestore:4.0.1'
implementation "com.yuyakaido.android:card-stack-view:2.3.2"
implementation 'link.fls:swipestack:0.3.0'
implementation 'com.mindorks.android:placeholderview:1.0.3'
annotationProcessor 'com.mindorks.android:placeholderview-compiler:1.0.3'
implementation 'com.synnapps:carouselview:0.1.5'
implementation "com.squareup.okhttp3:okhttp:3.14.1"
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
implementation 'com.ss.bannerslider:bannerslider:2.0.0'
implementation 'com.github.f0ris.sweetalert:library:1.5.6'
implementation 'com.sackcentury:shinebutton:0.2.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.facebook.android:facebook-login:5.15.3'
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha08'
````
}
应用插件:'com.google.gms.google-services'
解决方案
推荐阅读
- javascript - 更改状态是否会导致 ReactJS 中的重新渲染
- r - 在R中将一个长字符串拆分成完整的句子
- postgresql - Postgresql - SQL 查询列出数据库中的所有序列
- javascript - 如何复制这个cryptojs用PHP加密?
- 3d - 从一组 3d 线段中查找边界
- windows - 安装 CPAN 模块时“目标 'pm_to_blib' 的配方失败”(Text::CSV、Tie::RegexpHash、Log::Log4perl)
- dart - 获取 Dart 中 Timer 的剩余时间
- javascript - POST 操作后视图不显示更新的数据
- c++ - 无法链接到提升
- android - 我无法通过 ndk 在 android studio 中编译和 android 应用程序