0

Im trying to generate an APK to test my android build, it used to work before, i dont know what went wrong that it stopped working, whenever i try to run on device either on android studio or my own device, it does not build even though its error clean. App actually installs, but when its about to run it closes down and this message appears

enter image description here

enter image description here

enter image description here

Heres what i got from checking the logcat on Android Studio: https://i.stack.imgur.com/59340.jpg

1 Answers1

0

Try uninstalling the app from the device and then run it again.

The dev / debug build uses an encryption key that's specific to the machine so I think that maybe you are trying to install a different app over the original one?

rtpHarry
  • 13,019
  • 4
  • 43
  • 64
  • So, i kept trying and didn't go anywhere, here's a list of things i tried: - Re-installing the app, also uninstalled the emulator from android and re-installed. - Tried changing the app name in config.xml, capacitor.config, AndroidManifest.xml, strings.xml. - Tried generating new APK key. - Tried disabling instant run. None of them worked, i updated the main post with the latest error after i disabled instant run, the app installs successfully however, it wont run still. –  Aug 18 '19 at 21:38
  • Seems maybe you need to try viewing the system logs to see what the crash is? It's not something that I've done myself yet but [the guide is here](https://ionicframework.com/docs/building/android#viewing-native-logs). – rtpHarry Aug 19 '19 at 03:23
  • @rptHarry here's what the log returned: Process: com.projetoNewProject.PerdidosApp, PID: 7460 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.projetoNewProject.PerdidosApp/com.projetoNewProject.PerdidosApp.PrototypeApp.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.projetoNewProject.PerdidosApp.PrototypeApp.MainActivity" on path: DexPathList[[zip file "/data/app/com.projetoNewProject.PerdidosApp--6R3M5SgyDrmEnE6sbaiIg==/base.apk"],nativeLibraryDirectories=[/data/app/com.projetoNewProject.PerdidosApp –  Aug 20 '19 at 01:13
  • If this answer helped, please consider upvoting it. The full solution is not something I know the answer for but based on your new findings you should either close this question off or rewrite it to specifically ask what the new problem is. Include that full error text as text. At the moment your problem is buried in a comment and a single external image link. If you make it easy for people to find your problem then you make it easy for them to help you. – rtpHarry Aug 20 '19 at 04:04
  • The new error does [seem to be a common problem](https://stackoverflow.com/questions/6147241/android-app-classnotfoundexception-for-main-activity) -- to be honest you might actually be able to solve your issue yourself from what I suggested. – rtpHarry Aug 20 '19 at 04:07
  • 1
    The most sensible ajudstment i found was to generate a new app a not change anything at all, as my only intention was debugging –  Aug 20 '19 at 17:11