INSTALL_PARSE_FAILED_NO_CERTIFICATES in eclipse java photon - java

I have one old project that runs only in eclipse hence i have downloaded eclipse java photon and configured the ADT tools into it. I have mappped the Android sdk provided by studio with it and tried to run the app into the device but each time i run this app i am getting following error
Installing SLTL.apk...
Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES
Please check logcat output for more details.
Launch canceled!
when i checked the logcat i am getting following error
/com.android.defcontainer D/DefContainer: Copying /data/local/tmp/SLTL.apk to base.apk
10-02 14:17:52.233 1957-1990/system_process W/PackageManager: Failed collect during installPackageLI
android.content.pm.PackageParser$PackageParserException: Failed to collect certificates from /data/app/vmdl871259287.tmp/base.apk
at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1130)
at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1057)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:12196)
at com.android.server.pm.PackageManagerService.-wrap25(PackageManagerService.java)
at com.android.server.pm.PackageManagerService$9.run(PackageManagerService.java:10156)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Caused by: java.lang.NullPointerException: Attempt to get length of null array
at java.util.jar.Manifest.read(Manifest.java:201)
at java.util.jar.Manifest.<init>(Manifest.java:106)
at java.util.jar.StrictJarFile.<init>(StrictJarFile.java:66)
at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1072)
at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1057) 
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:12196) 
at com.android.server.pm.PackageManagerService.-wrap25(PackageManagerService.java) 
at com.android.server.pm.PackageManagerService$9.run(PackageManagerService.java:10156) 
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:148) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
at com.android.server.ServiceThread.run(ServiceThread.java:46) 
My system configuration is windows 10 and using java 1.8 as compiler with java 1.8 jre , i tried to search lot many threads and blogs but could not find the solution
I have tried editing the Android manifest file too but no luck

Related

Attempt to invoke virtual method 'java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)' on a null object reference

I updated my android studio from 3.1.2 to 3.1.3 and updated my project sdk version to 28 and when i run the application it crashes as soon as it open and throws the following exception,
FATAL EXCEPTION: main
Process: com.google.android.apps.nexuslauncher, PID: 10288
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)' on a null object reference
at android.os.Parcel.createException(Parcel.java:1948)
at android.os.Parcel.readException(Parcel.java:1865)
at android.app.IActivityManager$Stub$Proxy.startActivity(IActivityManager.java:4541)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1660)
at android.app.Activity.startActivityForResult(Activity.java:4574)
at com.android.launcher3.Launcher.startActivityForResult(SourceFile:1394)
at android.app.Activity.startActivity(Activity.java:4889)
at com.android.launcher3.Launcher.startActivitySafely(SourceFile:2000)
at com.android.launcher3.Launcher.startAppShortcutOrInfoActivity(SourceFile:1850)
at com.android.launcher3.Launcher.onClick(SourceFile:1703)
at android.view.View.performClick(View.java:6579)
at android.view.View.performClickInternal(View.java:6556)
at android.view.View.access$3100(View.java:777)
at android.view.View$PerformClick.run(View.java:25660)
at android.os.Handler.handleCallback(Handler.java:819)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
Caused by: android.os.RemoteException: Remote stack trace:
at android.app.LoadedApk.createAppFactory(LoadedApk.java:224)
at android.app.LoadedApk.<init>(LoadedApk.java:152)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:2043)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1998)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1970)
It is a problem of API P emulator. On API 28, 27 it works right.
As CoolMind said, It is a problem in API P emulator, you can solve it by updating your Google APIs Intel System Image in Android SDK.
Add these two lines in your gradle.properties file and then build project. After i added these lines, Android Studio showed stacktrace in Logcat.I fixed those issues and then my app started working.
android.enableD8.desugaring = true
android.enableR8 = true

java.lang.NoClassDefFoundError: com.google.android.gms.common.internal.zzbo

I know this question may be duplicate but I have tried many solutions but I am unable to make my app work. It should be noted that I have enabled Multidex but still getting below error. I am creating a react native app.
FATAL EXCEPTION: main
Process: com.xxxxxx.yyyyyyyy, PID: 3978
java.lang.NoClassDefFoundError: com.google.android.gms.common.internal.zzbo
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5049)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4623)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4563)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5333)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
If you are developing a react native application and above error came , just make sure that all of your dependencies's Gradle are using same version of firebase servces and play service base.
For example :- my app level gradle file contains
compile "com.google.android.gms:play-services-base:11.4.0"
compile "com.google.firebase:firebase-core:11.4.0"
compile "com.google.firebase:firebase-messaging:11.4.0"
compile "com.google.firebase:firebase-analytics:11.4.0"
compile "com.google.firebase:firebase-crash:11.4.0"
compile "com.google.firebase:firebase-ads:11.4.0"
and one react-native library is using
compile "com.google.android.gms:play-services-base:11.8.0"
and other one library is using
compile "com.google.android.gms:play-services-base:+"
so what i did , i changed all services version to 11.8.0.
BTW you can see gradles of all libraries or dependencies when you open your react-native-project/android folder in Android studio
I hope this will solve your issue

UnsatisfiedLinkError: Getting this error in Telegram project [duplicate]

This question already has answers here:
Android Telegram App --> java.lang.UnsatisfiedLinkError: No implementation found for void
(5 answers)
Closed 6 years ago.
I downloaded the Telegram project from GitHub and imported to Android Studio. The gradle is build without any error but when I run it I get UnsatisfiedLinkError error.
From logCat:
FATAL EXCEPTION: main
Process: org.telegram.messenger.beta, PID: 11299
java.lang.UnsatisfiedLinkError: No implementation found for void org.telegram.tgnet.ConnectionsManager.native_setJava(boolean) (tried Java_org_telegram_tgnet_ConnectionsManager_native_1setJava and Java_org_telegram_tgnet_ConnectionsManager_native_1setJava__Z)
at org.telegram.tgnet.ConnectionsManager.native_setJava(Native Method)
at org.telegram.messenger.ApplicationLoader.onCreate(ApplicationLoader.java:278)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1035)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4638)
at android.app.ActivityThread.access$1500(ActivityThread.java:155)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
And the line error points to is:
ConnectionsManager.native_setJava(android.os.Build.VERSION.SDK_INT == 14 || android.os.Build.VERSION.SDK_INT == 15);
Got stuck here for 2 days. Help me out. Thanks in advance.
Finally found the solution for it!
The project has C and CPP files that needs libraries which is in .so extension while running in devices.Recently they have deleted those files which is added in the commit section.That is why we get an exception while running.So we have run these C and CPP codes using NDK and Cygwin.
Download NDK:
http://developer.android.com/intl/es/ndk/downloads/index.html
Download Cygwin:
https://www.cygwin.com/
Removing prebuilt libraries. The source code for all libraries is (and always was) available here: https://github.com/DrKLO/Telegram/tree/master/TMessagesProj/jni

Unable to start server due following issues: Launch process failed with exit code 1

For 3 days now, I have been trying to install glassfish 4.1 on eclipse Luna version 4.4.1. I first installed the plugin from eclipse marketplace then added it in my runtime using jdk 8. I also made jdk my default since eclipse default uses jre. I have to point out that I have been been using glassfish on netbeans and tomcat on eclipse but I decided to play around with glassfish on eclipse. Every information I got on the internet didn't fix my issue.
Below is the error I got in the console. Right now, this is driving me nuts so I have decided to come to you for direction.
Thanks
Launching GlassFish on Felix platform
ERROR: Unable to create cache directory: C:\Program Files\glassfish-4.1\glassfish\domains\domain1\osgi-cache\felix
ERROR: Error creating bundle cache. (java.lang.RuntimeException: Unable to create cache directory.)
java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Exception in thread "Thread-1" java.lang.RuntimeException: org.osgi.framework.BundleException: Error creating bundle cache.
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:90)
Caused by: org.osgi.framework.BundleException: Error creating bundle cache.
at org.apache.felix.framework.Felix.init(Felix.java:645)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Caused by: java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
... 1 more
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: org.glassfish.embeddable.GlassFishException: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:170)
at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:157)
at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:112)
... 6 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.newFramework(OSGiGlassFishRuntimeBuilder.java:241)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:135)
... 9 more
Error stopping framework: java.lang.NullPointerException
java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher$1.run(GlassFishMain.java:203)
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Run Eclipse or any other IDE you use in Administrator mode.
Works for me.
I think your comment deserves to be posted as the main answer but I have been trying to mark your comment as answer but I wash't able to. So I decided to post post your comment here and then back it up with my own experience.
Answer by unwichtich:
I guess this is a similar problem. The cause may be that you have installed Glassfish in c:\Program Files. You can try to move your Glassfish installation to a directory where your normal user account has full access rights but you then have to change the path to the Glassfish installation in Eclipse.
My own experience:
Turns out that all the problems I had with the glassfish server (including exit code 1 error) was because glassfish could not handle folder names with spaces in it. So I moved the glassfish-4.1 folder from C:\Program File\glassfish-4.1.. path to C:\ glassfish-4.1.. It wiped all my tears away. This is really important in eclipse and netbeans IDEs (if you are installing the netbeans that does not come with a glassfish bundled zip).
I had the same problem and fixed it by installing Glassfish under C:\ instead of C:\Program Files. Try that.
use JDk 7 instead of JDK 8 am also faced the same issue i just changed to jdk7 its working now.

Java.Lang.VerifyError, Jenkins bug?

I meet a problem, which has blocked my work for three days. :(
when I build my Android project using Ant under Jenkins, the APK can not launch in phone, and Java.Lang.VerifyError exception occurs.
The weird thing is, in the same computer, eclipse can build and create a working apk by calling Ant. The jenkins and eclipse are using the same Ant, JDK, Android SDK and proguard.
Should this be a bug of Jenkins?
I posted the the exception information generated by jenkins built apk below, could anyone give me a hand? Please let me if you need more infromation.
java.lang.VerifyError: com.dewmobile.library.connection.network.m
at com.dewmobile.library.connection.network.s.q(Unknown Source)
at com.dewmobile.library.connection.network.s.a(Unknown Source)
at com.dewmobile.library.connection.service.DmConnectionService.e(Unknown Source)
at com.dewmobile.library.connection.service.DmConnectionService.onCreate(Unknown Source)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:1966)
at android.app.ActivityThread.access$2500(ActivityThread.java:121)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:997)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
at dalvik.system.NativeStart.main(Native Method)
java.lang.VerifyError happens when you have compiled against a different library than you are using at runtime.
I strongly suspect there is some path issue which is picking wrong version at compile time. I would suggest revisit all your configurations one more time.

Categories