Итак, моя проблема в том, что я получаю ошибку Class not found при запуске приложения на моем устройстве.
"io.tutorial.app.App" class not found at the path io.tutorial.app
На самом деле класс App.java присутствует в этом пути, и мой класс расширяется MultiDexApplication
.
На данный момент я обнаружил, что в построенном файле сгенерированы два файла dex.apk а именно classes.dex и classes2.dex.Странная вещь в том, что пакет «io.tutorial.app» присутствует в обоих файлах dex (я думаю, что это проблема).В пакете "io.tutorial.app" в файле classes2.dex нет классов, но все мои классы присутствуют в файле classes.dex в одном пакете "io.tutorial.app».Пожалуйста, помогите мне найти решение этой проблемы.
Манифест:
<application
android:theme="@style/AppTheme"
android:label="@string/app_name"
android:icon="@mipmap/ic_app"
android:name="io.tutorial.app.App"
android:allowBackup="true"
android:supportsRtl="true"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:theme="@style/AppTheme.NoActionBarFullScreen"
android:name=".ui.activity.SplashActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
Gradle: app
https://pastebin.com/JpkRZY1G
Класс приложения:
public class App extends MultiDexApplication {
@Inject
Cache cache;
public void onCreate() {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
super.onCreate();
initRemoteConfig();
Injector.getInstance().init(this);
Injector.getInstance().appComponent().inject(this);
initFabric();
initRealm();
initPicasso();
initRemoteConfig();
initAds();
initOneSignal();
}