1

Tenho um problema , eu á dias estive a trabalhar noutro pc e quando fui abrir o project desta app que ao enviar estava zippado deu me um erro enorme que nunca me tinha dado antes. Quando faço run da este fatal error :

Process: com.pedrogouveia.averagemaker, PID: 5409 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.pedrogouveia.averagemaker/com.pedrogouveia.averagemaker.Testes}: java.lang.ClassNotFoundException: Didn't find class "com.pedrogouveia.averagemaker.Testes" on path: DexPathList[[zip file "/data/app/com.pedrogouveia.averagemaker-EzxBBw3AdLg_AgeJWlQsIQ==/base.apk", zip file "/data/app/com.pedrogouveia.averagemaker-EzxBBw3AdLg_AgeJWlQsIQ==/split_lib_slice_1_apk.apk", zip file "/data/app/com.pedrogouveia.averagemaker-EzxBBw3AdLg_AgeJWlQsIQ==/split_lib_slice_5_apk.apk", zip file "/data/app/com.pedrogouveia.averagemaker-EzxBBw3AdLg_AgeJWlQsIQ==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.pedrogouveia.averagemaker-EzxBBw3AdLg_AgeJWlQsIQ==/lib/x86, /system/lib, /system/vendor/lib]]

Meu manifest:

    <?xml version="1.0" encoding="utf-8"?>

<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />

<supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:requiresSmallestWidthDp="320"
    android:smallScreens="false"
    android:xlargeScreens="true" />

<application
    android:name=".CustomApplication"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".Fazer_media.Final"
        android:screenOrientation="portrait" />
    <activity
        android:name=".Fazer_media.Automatico"
        android:screenOrientation="portrait" />
    <activity
        android:name=".Fazer_media.Automatico2"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="adjustPan" />
    <activity
        android:name=".Testes"
        android:label="Your Study Life Companion"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme.NoActionBar"
        android:windowSoftInputMode="adjustPan">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".TesteInfoDisplay"
        android:screenOrientation="portrait" />
    <activity
        android:name=".TestList"
        android:screenOrientation="portrait" />
    <activity
        android:name=".Begining.Intro"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.NoActionBar" />
    <activity
        android:name=".Begining.ChoseEnsino"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.NoActionBar" />
    <activity
        android:name=".Begining.ChoseSecundarioDisciplinas"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.NoActionBar" />
    <activity
        android:name=".Begining.ChoseDisciplinas2"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.NoActionBar" />
    <activity
        android:name=".Begining.Prof_Univ"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.NoActionBar"
        android:windowSoftInputMode="adjustPan" />
    <activity
        android:name=".Begining.Disciplina_row"
        android:screenOrientation="portrait"></activity>
</application>

E não sei porque isto acontece sera porque o projecto estava zippado ? Não faço ideia

1 Resposta 1

1

Resolvi meu problema desativando o instant Run !

AndroidStudio -> Preferences -> Build,Execution,Deployment -> Instant Run -> Uncheck Instant Run

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .