Приложение для Android закрыто после открытия без ошибки сборки

#android #kotlin #logcat #noclassdeffounderror #android-build

#Android #котлин #логкэт #ошибка noclassdeffounderror #android-сборка

Вопрос:

Когда я запустил apk на тестовом телефоне, приложение зависло и разбилось. Как я могу это исправить?

Я новичок в Android

консоль сказала :

Задача: подготовить kotlinbuildscriptmodel К ОБНОВЛЕНИЮ

СБОРКА ПРОШЛА УСПЕШНО за 3 секунды


 I/System.out: Debugger has connected
    waiting for debugger to settle...
I/chatty: uid=10089(com.angopapo.datooapp) identical 1 line
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/chatty: uid=10089(com.angopapo.datooapp) identical 3 lines
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1495)
I/gopapo.datooap: The ClassLoaderContext is a special shared library.
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.angopapo.datooapp, PID: 7172
    java.lang.RuntimeException: Unable to instantiate application com.example.datooapp.app.Application: java.lang.ClassNotFoundException: Didn't find class "com.example.datooapp.app.Application" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.angopapo.datooapp-Ge-OIFCx8dkSbMgu7ZYf6Q==/base.apk"],nativeLibraryDirectories=[/data/app/com.angopapo.datooapp-Ge-OIFCx8dkSbMgu7ZYf6Q==/lib/x86_64, /data/app/com.angopapo.datooapp-Ge-OIFCx8dkSbMgu7ZYf6Q==/base.apk!/lib/x86_64, /system/lib64]]
        at android.app.LoadedApk.makeApplication(LoadedApk.java:1069)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5842)
        at android.app.ActivityThread.access$1100(ActivityThread.java:199)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.datooapp.app.Application" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.angopapo.datooapp-Ge-OIFCx8dkSbMgu7ZYf6Q==/base.apk"],nativeLibraryDirectories=[/data/app/com.angopapo.datooapp-Ge-OIFCx8dkSbMgu7ZYf6Q==/lib/x86_64, /data/app/com.angopapo.datooapp-Ge-OIFCx8dkSbMgu7ZYf6Q==/base.apk!/lib/x86_64, /system/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:50)
        at androidx.core.app.CoreComponentFactory.instantiateApplication(CoreComponentFactory.java:52)
        at android.app.Instrumentation.newApplication(Instrumentation.java:1120)
        at android.app.LoadedApk.makeApplication(LoadedApk.java:1061)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5842) 
        at android.app.ActivityThread.access$1100(ActivityThread.java:199) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6669) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
    ```

I see  `java.lang.ClassNotFoundException:` Didn't find class `"com.example.datooapp.app.Application"` 
mean that that the class name is wrong? 

I have typed in: `com.angopapo.datooapp` as package name, 

I found the name under: `build.gradle`:
 

compileSdkVersion 28
defaultConfig {
Идентификатор приложения «com.angopapo.datooapp»
«

или где найти правильное имя? или есть какая-то другая причина?

Обновление: спасибо за вашу помощь <3

здесь logcat:

 2021-02-18 12:45:34.063 6178-6178/? I/gopapo.datooap: Not late-enabling -Xcheck:jni (already on)
2021-02-18 12:45:34.335 6178-6178/? W/gopapo.datooap: Unexpected CPU variant for X86 using defaults: x86_64
2021-02-18 12:45:34.645 6178-6178/com.angopapo.datooapp I/gopapo.datooap: The ClassLoaderContext is a special shared library.
2021-02-18 12:45:36.304 6178-6178/com.angopapo.datooapp D/AndroidRuntime: Shutting down VM
2021-02-18 12:45:36.307 6178-6178/com.angopapo.datooapp E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.angopapo.datooapp, PID: 6178
    java.lang.RuntimeException: Unable to instantiate application com.example.datooapp.app.Application: java.lang.ClassNotFoundException: Didn't find class "com.example.datooapp.app.Application" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.angopapo.datooapp-Nw8AOQZhqW2yTX5skdLjHg==/base.apk"],nativeLibraryDirectories=[/data/app/com.angopapo.datooapp-Nw8AOQZhqW2yTX5skdLjHg==/lib/x86_64, /data/app/com.angopapo.datooapp-Nw8AOQZhqW2yTX5skdLjHg==/base.apk!/lib/x86_64, /system/lib64]]
        at android.app.LoadedApk.makeApplication(LoadedApk.java:1069)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5842)
        at android.app.ActivityThread.access$1100(ActivityThread.java:199)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.datooapp.app.Application" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.angopapo.datooapp-Nw8AOQZhqW2yTX5skdLjHg==/base.apk"],nativeLibraryDirectories=[/data/app/com.angopapo.datooapp-Nw8AOQZhqW2yTX5skdLjHg==/lib/x86_64, /data/app/com.angopapo.datooapp-Nw8AOQZhqW2yTX5skdLjHg==/base.apk!/lib/x86_64, /system/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:50)
        at androidx.core.app.CoreComponentFactory.instantiateApplication(CoreComponentFactory.java:52)
        at android.app.Instrumentation.newApplication(Instrumentation.java:1120)
        at android.app.LoadedApk.makeApplication(LoadedApk.java:1061)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5842) 
        at android.app.ActivityThread.access$1100(ActivityThread.java:199) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6669) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 

 

и вот манифест:

 <?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.angopapo.datooapp">

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

    <!--Internet-->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.BLUETOOTH" />

    <!--Storage-->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <!--Sensors and Device-->
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.FLASHLIGHT"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE" />

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

    <!--Account and Notifications-->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="com.angopapo.datooapp.permission.C2D_MESSAGE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />


    <!--Badge and Shortcut-->
    <uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS"/>
    <uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT"/>
    <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE"/>
    <uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE"/>
    <uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT"/>
    <uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE"/>
    <uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE"/>
    <uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS"/>
    <uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS"/>
    <uses-permission android:name="android.permission.READ_APP_BADGE"/>
    <uses-permission android:name="com.oppo.launcher.permission.READ_SETTINGS"/>
    <uses-permission android:name="com.oppo.launcher.permission.WRITE_SETTINGS"/>
    <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" tools:ignore="ProtectedPermissions" />


    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true"/>

    <uses-feature
        android:name="android.hardware.camera"
        android:required="false"/>

    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="false"/>

    <uses-feature
        android:name="android.hardware.camera.flash"
        android:required="false"/>

    <uses-feature
        android:name="android.hardware.telephony"
        android:required="false"/>

    <uses-feature
        android:name="android.hardware.location.gps"
        android:required="false"/>
    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false"/>

    <permission
        android:name="com.angopapo.datooapp.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <application
        android:name="com.example.datooapp.app.Application"
        android:allowBackup="false"
        android:hardwareAccelerated="true"
        android:largeHeap="true"
        android:supportsRtl="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        android:fullBackupContent="@xml/backup_descriptor">

        <activity
            android:name="com.example.datooapp.app.SplashScreen"
            android:noHistory="true"
            android:alwaysRetainTaskState="true"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:windowSoftInputMode="stateAlwaysHidden|adjustResize"
            android:theme="@style/ThemeApp.NoWindowPreview">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths"/>
        </provider>

        <!--Network monitoring-->

        <service
            android:name="com.example.datooapp.modules.merlin.MerlinService"
            android:exported="false" />

        <!-- Google Setup -->
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_api_key_geo" />

        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="@string/admob_app_id"/>

        <!-- Facebook Integration-->
        <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>

        <!--Push notifications services-->
        <service
            android:name="com.parse.fcm.ParseFirebaseMessagingService"
            tools:ignore="ExportedService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
            </intent-filter>
        </service>

        <receiver
            android:name="com.example.datooapp.pushNotifications.CustomPushReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="com.parse.push.intent.RECEIVE" />
                <action android:name="com.parse.push.intent.DELETE" />
                <action android:name="com.parse.push.intent.OPEN" />
            </intent-filter>
        </receiver>

        <activity
            android:name="com.example.datooapp.authUtils.AngopapoLoginActivity"
            android:label="@string/app_name"
            android:launchMode="singleTop">
            <meta-data
                android:name="AngopapoLogin.APP_LOGO"
                android:resource="@mipmap/ic_launcher"/>
            <meta-data
                android:name="AngopapoLogin.PARSE_LOGIN_ENABLED"
                android:value="true"/>
            <meta-data
                android:name="AngopapoLogin.PARSE_LOGIN_EMAIL_AS_USERNAME"
                android:value="true"/>
            <meta-data
                android:name="AngopapoLogin.PARSE_LOGIN_HELP_TEXT"
                android:value="@string/password_reset_text"/>
            <meta-data
                android:name="AngopapoLogin.MIN_PASSWORD_LENGTH"
                android:value="6"/>
            <meta-data
                android:name="AngopapoLogin.FACEBOOK_LOGIN_ENABLED"
                android:value="true"/>
            <meta-data
                android:name="AngopapoLogin.TWITTER_LOGIN_ENABLED"
                android:value="false"/>
            <!-- We reference a string-array resource here, so we must use android:resource -->
            <meta-data
                android:name="AngopapoLogin.FACEBOOK_LOGIN_PERMISSIONS"
                android:resource="@array/my_facebook_permissions"/>

        </activity>

        <activity android:name="com.example.datooapp.auth.WelcomeActivity" />
        <activity android:name="com.example.datooapp.authUtils.AngopapoSignupActivity" />

        <activity android:name="com.example.datooapp.auth.FacebookLink" />
        <activity android:name="com.example.datooapp.app.BaseActivity" />
        <activity
            android:name="com.example.datooapp.app.DispatchActivity"
            android:noHistory="true"/>
        <activity android:name="com.example.datooapp.home.HomeActivity" />
        <activity android:name="com.example.datooapp.home.uploads.UploadsActivity" />

        <activity
            android:name="com.example.datooapp.modules.instagram.InstagramAuthActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:excludeFromRecents="true"
            android:theme="@style/Theme.AppCompat.Dialog"
            android:launchMode="singleTask" />
        <activity android:name="com.example.datooapp.home.nearby.ManualLocationActivity" />
        <activity android:name="com.example.datooapp.home.popularity.PopularityActivity" />
        <activity android:name="com.example.datooapp.home.payments.PaymentsActivity" />
        <activity android:name="com.example.datooapp.home.settings.SettingsActivity" />
        <activity android:name="com.example.datooapp.home.encounters.LikedYouActivity" />
        <activity android:name="com.example.datooapp.home.encounters.MutualAttractionActivity" />
        <activity android:name="com.example.datooapp.home.profile.PhotosViewerActivity" />
        <activity android:name="com.example.datooapp.home.settings.basicInfo.BasicInfoActivity" />
        <activity android:name="com.example.datooapp.home.settings.account.AccountActivity" />
        <activity android:name="com.example.datooapp.home.settings.accountPreferences.AccountPreferencesActivity" />
        <activity android:name="com.example.datooapp.home.settings.accountPreferences.SettingsPrivacyActivity" />
        <activity android:name="com.example.datooapp.home.settings.accountPreferences.SettingsInvisibleModeActivity" />
        <activity android:name="com.example.datooapp.home.settings.accountPreferences.SettingsNotificationsActivity" />
        <activity android:name="com.example.datooapp.home.settings.WebUrlsActivity" />
        <activity android:name="com.example.datooapp.home.settings.about.AboutActivity" />
        <activity android:name="com.example.datooapp.home.settings.about.AboutAppActivity" />
        <activity android:name="com.example.datooapp.home.settings.BlockedUsersActivity" />
        <activity android:name="com.example.datooapp.home.profile.ReportBlockActivity" />
        <activity android:name="com.example.datooapp.home.profile.EditProfileActivity" />
        <activity android:name="com.example.datooapp.home.connections.FeatureActivationActivity" />
        <activity android:name="com.example.datooapp.home.connections.ChatActivity" />
        <activity android:name="com.example.datooapp.home.calls.CallActivity" />
        <activity android:name="com.example.datooapp.home.connections.IncomingActivity"
            android:configChanges="orientation|screenSize"
            android:excludeFromRecents="true"
            android:label="@string/app_name"
            android:theme="@style/MyAppCompatDialogTheme"/>

        <activity android:name="com.example.datooapp.home.live.WalletActivity" />
        <activity android:name="com.example.datooapp.home.live.LiveActivity" />
        <activity android:name="com.example.datooapp.home.live.LiveStreamingActivity" />
        <activity android:name="com.example.datooapp.home.profile.PhotoViewerActivity" />
        <activity android:name="com.example.datooapp.home.calls.VoiceCallActivity" />

    </application>

</manifest>
 

Комментарии:

1. вы должны logcat искать ошибки. добавьте ошибку в свой вопрос, чтобы мы могли вам помочь

2. Можете ли вы поделиться своим файлом манифеста Android?

3. спасибо за помощь, у меня есть тема, обновленная с помощью android manifest и logcat 🙂 редактировать: когда я вижу текст: com.example.datooapp.app.Application , я думаю, что я должен заменить

4. существует ли com.example.datooapp.app.Application в вашем проекте?

5. спасибо за помощь, я обновил поток с помощью android manifest и logcat 🙂 редактировать: когда я вижу текст: com.example.datooapp.app.Application , я думаю, что я должен заменить: com.example.datooapp.app.Application на: com.angopapo.datooapp.app.Приложение?? и это в каждой строке ? или как лучше всего? , спасибо за все 🙂 Нет, я думаю, что нет @ trixo, это был купленный шаблон, я думаю, правильный: package=»com.angopapo.datooapp»>