I am getting an Error while installing apk in android 5.1.
Package couldn't be installed in /data/app/com.acelrtech.apps.xxxxxxxxx-1
com.android.server.pm.PackageManagerException: scanPackageLI
at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:6313)
at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:5605)
at com.android.server.pm.PackageManagerService.installNewPackageLI(PackageManagerService.java:10550)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:11128)
at com.android.server.pm.PackageManagerService.access$2800(PackageManagerService.java:241)
at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:8993)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Here is the Gradle main part looks looks like . Hoping for a better input.
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.acelrtech.apps.xxxxxxxxxxxx”
minSdkVersion 14
targetSdkVersion 21
versionCode 23
versionName "2016.6.21"
generatedDensities = []
multiDexEnabled true
}
Also i tried the this solution ..
Related
I am using koin dependency injection in my project but started getting many ANR's in my project though we couldn't reporoduce but real users are getting affected this happened when we updated our compiledSdkVersion and TargetSdkVersion to 32.
koin_version = '2.0.1' current koin version
compiledSdkVersion and TargetSdkVersion is 32.
minSdkVersion 21
There is a new koin version available which is 3.3.2 but they have change the package and we will have to update our whole project to import new package shall we do that?
Any help or suggestion appreciated,
Thanks
at org.koin.core.instance.DefinitionInstance.create(DefinitionInstance.kt:54)
at org.koin.core.instance.SingleDefinitionInstance.get(SingleDefinitionInstance.kt:40)
at org.koin.core.definition.BeanDefinition.resolveInstance(BeanDefinition.kt:70)
at org.koin.core.scope.Scope.resolveInstance(Scope.kt:165)
at org.koin.core.scope.Scope.get(Scope.kt:128)
at org.koin.core.scope.Scope.get(Scope.java:83)
at com.mobile.newArch.module.MyApplication.onCreate(MyApplication.kt:124)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7593)
at android.app.ActivityThread.access$1500(ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2177)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8653)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Crash on 64-bit armv8 devices with below stack trace. Checked with few different
Android System WebView versions including latest beta version (77.0.3865.73).
To Reproduce:
Create a project with react-native init AwesomeProject --0.60.5
Install the the react-native-webview using React Native WebView Getting Started Guide
Stack trace
E/unknown:ReactNative: Exception in native call
android.content.res.Resources$NotFoundException: String resource ID #0x3040003
at android.content.res.HwResources.getText(HwResources.java:1287)
at android.content.res.Resources.getString(Resources.java:431)
at com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:709)
at com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:633)
at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:685)
at com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:834)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:670)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:605)
at com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:319)
at com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:104)
at com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:271)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:131)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:118)
at com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:115)
at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:268)
at android.webkit.WebView.<init>(WebView.java:597)
at android.webkit.WebView.<init>(WebView.java:531)
at android.webkit.WebView.<init>(WebView.java:514)
at android.webkit.WebView.<init>(WebView.java:501)
at android.webkit.WebView.<init>(WebView.java:491)
at com.reactnativecommunity.webview.RNCWebViewManager$RNCWebView.<init>(RNCWebViewManager.java:902)
at com.reactnativecommunity.webview.RNCWebViewManager.createRNCWebViewInstance(RNCWebViewManager.java:154)
at com.reactnativecommunity.webview.RNCWebViewManager.createViewInstance(RNCWebViewManager.java:160)
at com.reactnativecommunity.webview.RNCWebViewManager.createViewInstance(RNCWebViewManager.java:104)
at com.facebook.react.uimanager.ViewManager.createViewInstanceWithProps(ViewManager.java:119)
at com.facebook.react.uimanager.ViewManager.createViewWithProps(ViewManager.java:66)
at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:259)
at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:198)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1036)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1007)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:798)
at android.view.Choreographer.doCallbacks(Choreographer.java:603)
at android.view.Choreographer.doFrame(Choreographer.java:571)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5667)
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:962)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
Screenshots:
Thanks #mike-hardy, He provides a workaround for this issue in gitHub
Add below lines to your MainActivity.java
// Workaround appcompat-1.1.0 bug https://issuetracker.google.com/issues/141132133
#Override
public void applyOverrideConfiguration(Configuration overrideConfiguration) {
if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT <= 25) {
return;
}
super.applyOverrideConfiguration(overrideConfiguration);
}
I have a legacy application which had following build configurations
targetSdkVersion 23
compileSdkVersion 23
buildToolsVersion 23.0.2
SupportLibVersion 23.4.0
gradle 2.2.0
and I updated them to
gradle version 3.1.4
targetSdkVersion 27
compileSdkVersion 27
buildToolsVersion 27.0.3
SupportLibVersion 27.1.1
Constrain layout 1.0.2
Now when I run the app in emulator or mobile, the app which has home screen as Tablayout viewpager with a number of fragments loading as a list in each page (FragmentPagerAdapter) crashes when I vertically scroll any of the tab items.The actual error I am getting after this upgrade is "No view found for ID of .. fragment". I didn't make any code changes at all, only updated configurations.
I tried to debug this but it seems to be a support library issue. I have verified that I am using same support library version for all different dependencies like appcompat, design, recyclerview, annotation etc. Please suggest a solution.
Note: I tried to downgrade the support library versions and debug, if I change to 23.4.0 the crash doesn't happen, from 25.2.0 onwards it crashes.
Activity state:
09-23 14:14:30.214 11596-11596/com.*** E/AndroidRuntime:
FATAL EXCEPTION: main
Process: com.****, PID: 11596
java.lang.IllegalArgumentException: No view found for id 0x7 (unknown) for fragment ****Fragment{a92e376 #2 id=0x7}
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1293)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:757)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2355)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2146)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2098)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2008)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
As an example, dynamically loading the following code using the groovyshell-example app found here: https://github.com/pieces029/grooidshell-example/tree/update/build-tools-and-scripts:
def class Outer {
def class Inner {}
}
new Outer.Inner()
Result in Android Emulator API 23
Result = Outer$Inner#a9ea1cd
Result in Android Emulator API 24
Result = null
Stacktrace in API 24
08-13 02:23:03.233 3147-3147/me.champeau.groovydroid E/GrooidShell: Dynamic loading failed!
BUG! exception in phase 'semantic analysis' in source unit 'script14710549832242032452851.groovy' throw with null exception
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:935)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:542)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:254)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:211)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:221)
at me.champeau.groovydroid.GrooidShell.evaluate(GrooidShell.java:85)
at me.champeau.groovydroid.GroovyActivity.generateMessage(GroovyActivity.groovy:38)
at me.champeau.groovydroid.GroovyActivity.executeCode(GroovyActivity.groovy:31)
at java.lang.reflect.Method.invoke(Native Method)
at android.view.View$DeclaredOnClickListener.onClick(View.java:4693)
at android.view.View.performClick(View.java:5610)
at android.view.View$PerformClick.run(View.java:22260)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.lang.NullPointerException: throw with null exception
at java.net.URLClassLoader.findClass(URLClassLoader.java:371)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:677)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:545)
at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:185)
at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:170)
at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:126)
at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:676)
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:308)
at org.codehaus.groovy.control.ResolveVisitor.resolveNestedClass(ResolveVisitor.java:341)
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:308)
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:276)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:260)
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:272)
at org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:1047)
at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:706)
at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:142)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:166)
at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1318)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:104)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:115)
at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:53)
08-13 02:23:03.234 3147-3147/me.champeau.groovydroid E/GrooidShell: at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:201)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:126)
at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1078)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53)
at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1261)
at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:176)
at org.codehaus.groovy.control.CompilationUnit$11.call(CompilationUnit.java:651)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
... 21 more
The version of the DX library included in that project is 1.7. Where the best I can tell by opening up the dx.jar file included with the latest (24.1.1) build tools is 1.12. I am guessing that similar to Java backwards compatibility is kept in place but lower versions will not run on newer version.
On that note, I would guess that someone just posted the dx jar to central and that is not an official google release. I think the best bet would be to reference the jar that is included in the build tools you are compiling with.
I'm trying to implement the sample android app provided here.
I've installed all the dependencies as directed, but when I run the code on an actual phone, the error messages suggests (I think!) that the method setCoookieStore() doesn't exist and that's leading to problems down the road. Is this actually a problem with AsyncHttpClient or is this something which should be done in the parent class? How can I resolve it?
I've tried googling around quite a bit, but most results don't seem relevant and quite often are over my head (Android development beginner...). This seems like the closest thing I could find, but I'm not sure if it's right or how to implement it if it is: Using Cookies across Activities when using HttpClient.
Thank you for your help!
This is the overall series of error message
04-29 05:58:24.386 6867-6867/? E/Zygote: MountEmulatedStorage()
04-29 05:58:24.386 6867-6867/? E/Zygote: v2
04-29 05:58:24.386 6867-6867/? E/Zygote: accessInfo : 0
04-29 05:58:24.386 6867-6867/? E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
04-29 05:58:25.066 6867-6867/com.empatica.empalinksample E/EMPA_C: Loaded
04-29 05:58:25.086 6867-6867/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.empatica.empalinksample, PID: 6867
java.lang.NoSuchMethodError: No virtual method setCookieStore(Lorg/apache/http/client/CookieStore;)V in class Lcom/loopj/android/http/AsyncHttpClient; or its super classes (declaration of 'com.loopj.android.http.AsyncHttpClient' appears in /data/app/com.empatica.empalinksample-2/base.apk)
at com.empatica.empalink.EmpaDeviceManager.<init>(EmpaDeviceManager.java:180)
at com.empatica.empalink.EmpaDeviceManager.<init>(EmpaDeviceManager.java:166)
at com.empatica.sample.MainActivity.onCreate(MainActivity.java:64)
at android.app.Activity.performCreate(Activity.java:6550)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3108)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3263)
at android.app.ActivityThread.access$1000(ActivityThread.java:197)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1687)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6897)
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:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Apparently I needed to add "useLibrary 'org.apache.http.legacy'" to my app's build.gradle file and make sure the compileSdkVersion and buildToolsVersion were pointing to 23 (instead of 21 which they were before).
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
useLibrary 'org.apache.http.legacy'
....