Crashlytics Android: app could not be located - java

To create an application and has built fabric.io.
My app release 1.1 - everything works, statistics comes.
My app released 1.2 - it does not work, the statistics do not come.
When you come on the dashboard fabric.io:
Alert! Sorry, the app could not be located.
An important point:
If you build debug version - it works!
If the release version of the GoogleStore - is not working! (Although version 1.1 of the GoogleStore - works!)
Checked logcat release version:
Logcat: I/Fabric: Initializing Crashlytics 2.2.2.37
What could be wrong? How to solve this problem?
Thank you!

If you are building a release version and using ProGuard you should add following lines in your ProGuard file:
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
This documentation could be useful for you too Dex and ProGuard and Advanced Setup.

Related

Android release build fail after upgrading to Gradle wrapper to 7.0.2 and JDK 11

I have updated my Android Studio to Artic Fox as well as Gradle wrapper to 7.0.2 (plugin 7.0.0) and JDK 1.8 -> 11.
When I install a debug build on my device through Android Studio, it works, and no error.
Now whenever I try to create a release APK, the build always fails with a Lint error. Not sure what is going on.
w: Runtime JAR files in the classpath have the version 1.4, which is older than the API version 1.5. Consider using the runtime of version 1.5, or pass '-api-version 1.4' explicitly to restrict the available APIs to the runtime of version 1.4. You can also pass '-language-version 1.4' instead, which will restrict not only the APIs to the specified version, but also the language features
w: /Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.4.10/998caa30623f73223194a8b657abd2baec4880ea/kotlin-stdlib-jdk8-1.4.10.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
w: /Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.4.31/84ce8e85f6e84270b2b501d44e9f0ba6ff64fa71/kotlin-stdlib-jdk7-1.4.31.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
w: /Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.32/461367948840adbb0839c51d91ed74ef4a9ccb52/kotlin-stdlib-1.4.32.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
w: /Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.4.32/ef50bfa2c0491a11dcc35d9822edbfd6170e1ea2/kotlin-stdlib-common-1.4.32.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
/src/main/AndroidManifest.xml:23: Error: SplashScreenActivity must extend android.app.Activity [Instantiatable]
android:name="com.abc.xyz.activity.SplashScreenActivity"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/src/main/AndroidManifest.xml:36: Error: MainActivity must extend android.app.Activity [Instantiatable]
android:name="com.abc.xyz.activity.MainActivity"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/src/main/AndroidManifest.xml:66: Error: PlayerActivity must extend android.app.Activity [Instantiatable]
android:name="com.abc.xyz.activity.PlayerActivity"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "Instantiatable":
/Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.4.10/998caa30623f73223194a8b657abd2baec4880ea/kotlin-stdlib-jdk8-1.4.10.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
Activities, services, broadcast receivers etc. registered in the manifest
file (or for custom views, in a layout file) must be "instantiatable" by
the system, which means that the class must be public, it must have an
empty public constructor, and if it's an inner class, it must be a static
inner class.
/Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.4.31/84ce8e85f6e84270b2b501d44e9f0ba6ff64fa71/kotlin-stdlib-jdk7-1.4.31.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
3 errors, 0 warnings
Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
I am not sure why do I have those Instantiatable errors on activities. All these activities extend one BaesActivity which extends AppCompatActivity. So the error doesn't really make any sense.
But when I downgrade Gradle wrapper to 6.7.1 (Plugin 4.2.2) and JDK 1.8...everything runs smoothly.
also, I have these warnings like
/Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.4.10/998caa30623f73223194a8b657abd2baec4880ea/kotlin-stdlib-jdk8-1.4.10.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5
What is this warning and how can I fix it?
After a lot of searching, I found the solution to this.
Build fails because of Instantiatable lint check.
Activities, services, broadcast receivers etc. registered in the manifest
file (or for custom views, in a layout file) must be "instantiatable"
There are a couple of solutions to this,
Updating an application-level build.gradle (not desirable though)
android {
lintOptions {
disable "Instantiatable"
}
}
If your application is dependent on a library module (like me, I had BaseActivities in library modules) then disable minifyEnabled on a library-module, there is no need for that unless you are trying to publish a library module (.aar file).
Refere issue from here.
More specifically this comment from here.
Go to File -> Settings, search Kotlin Complier and change language version to 1.4
in the compiler settings, You can set api version, language version and command-line parameters.
I had the same issue. I can solve with this trick:
1) Clean Proyect
2) Rebuild Proyect
3) Open Emulator with some API
4) Change from Debug to Release (Active Build Variant)
5) Build Bundle / APKs > Build Bundle
I don't know if it works for you.

How to sync ExoPlayer library in Android?

My app crashed when it comes to sync ExoPlayer library. At first, it crashes when I had Android Studio 3.6 and for no reason it gave me following errors:
enter image description here
enter image description here
but recently I updated Android Studio to 4.0 so I can sync ExoPlayer libraries and no problem when running app
implementation 'com.google.android.exoplayer:exoplayer-core:2.11.4'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.11.4'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.11.4'
but when I add XML code as you see in the following
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="#+id/video_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
and run my app it crashes and gives me the following error:
2020-05-30 12:39:59.271 18182-18182/? E/Zygote: isWhitelistProcess - Process
is Whitelisted
2020-05-30 12:39:59.271 18182-18182/? E/libpersona: scanKnoxPersonas
2020-05-30 12:39:59.271 18182-18182/? E/libpersona: Couldn't open the File -
/data/system/users/0/personalist.xml - No such file or directory
2020-05-30 12:40:00.364 18182-18182/com.example.myapplication A/libc: Fatal
signal 11 (SIGSEGV), code
1, fault addr 0xb5a9f98 in tid 18182 (e.myapplication), pid 18182
(e.myapplication)
Make Sure you are implemented all below steps :
1- Add repositories:
you should add add these repos exactly with writted order. (buld.gradle:project)
repositories {
google()
mavenCentral()
}
2- Add ExoPlayer full module dependency
implementation 'com.google.android.exoplayer:exoplayer:2.11.4'
3- Turn on Java 8 support (buld.gradle - module:app)
android{
...
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
}
}
Follow up on #Yasin's answer.
With Google's decision to sunset jcenter in 2022, you might run into another problem - that is your current old version of ExoPlayer is only provided on jcenter but not on google. So I would suggest you to migrate to latest version of ExoPlayer, i.e. v15, as soon as possible - which is guaranteed to be found on google.

why Android App is crashing with UnsatisfiedLinkError?

I created a react-native app and published it yesterday. The app is crashing whenever I try to open it on a real device but is is working in a simulator(using android studio). I collected a user sent crash report it is showing me this error. I am a beginner in android development and I don't know java.
I used android app bundle.
Can anyone help me to diagnose the error and what could I do to get more information regarding this and also how can I fix it.
java.lang.UnsatisfiedLinkError:
at com.facebook.soloader.SoLoader.loadLibraryBySoName (SoLoader.java:314)
at com.facebook.soloader.SoLoader.loadLibrary (SoLoader.java:247)
at com.facebook.react.bridge.ReactBridge.staticInit (ReactBridge.java:18)
at com.facebook.react.bridge.NativeMap.<clinit> (NativeMap.java:19)
at com.facebook.react.bridge.JSCJavaScriptExecutorFactory.create (JSCJavaScriptExecutorFactory.java:21)
at com.facebook.react.ReactInstanceManager$5.run (ReactInstanceManager.java:912)
at java.lang.Thread.run (Thread.java:764)
I solved one issue after adding this into the build.gradle file. But now It is showing me an older version of the app and also dependency graph is not loaded. It is stuck. Help
ndk {
abiFilters "armeabi-v7a", "x86", 'armeabi', 'arm64-v8a'
}
packagingOptions {
exclude "lib/arm64-v8a/libgnustl_shared.so"
exclude '/lib/mips64/**'
exclude '/lib/arm64-v8a/**'
exclude '/lib/x86_64/**'
}
You have to upgrade the react-native version to 0.59 for supporting 64-bit native libs. http://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059

Graphhopper not working in release apk.

I have developed an android application using the graphhopper routing library. The library works fine in debug mode or in app-debug.apk but when I create a release apk of the app the library wont work. It is giving me java.lang.IllegalStateException: No input stream found in class path!? exception upon execution of the following code.
/*
*Constants.ROUTE_FILE_PATH = Environment.getExternalStorageDirectory().getPath()+"/.myappfolder/routes";
*/
File routingFiles = new File(Constants.ROUTE_FILE_PATH);
GraphHopper tmpHopp = new GraphHopper().forMobile();
tmpHopp.load(routingFiles.getAbsolutePath());
While creating the release apk i got some warning for the graphhopper library and removed the warnings using
-dontwarn com.graphhopper.**
in the proguard-rules.pro file.
Is there any issue with creating a release apk of the graphhopper project?
Why wont the library work in release version of the apk?
Ok so I have found 2 answers to the issue.
Firstly, you can set
minifyEnabled false
in build.gradle. This works as a solution too but your app wont get minified.
Secondly according to the answer posted here you can set
-keep class com.graphhopper.** { *; }
in the proguard-rules.pro.
So whichever answer suits you best.

Twitter bootstrap version 3.0.0 not working in grails

I am currently using twitter bootstrap 2.3.0 in my grails project. I want to switch to the newly released version 3.0. I have added this line to the dependencies in buildconfig file.
compile ":twitter-bootstrap:3.0.0"
But when I synchronize the project then the following error occurs.
I have also tried installing from command line but failed. the error log is as following.
: problems summary ::
:::: ERRORS
grailsCentral: bad organisation found in http://grails.org/plugins/grails-twitter-bootstrap/tags/RELEASE_3_0_0/twitter-bootstrap-3.0.0.pom: expected='' found='org.grails.plugins'
what should I do now ? Thanks in advance.
I've solved the issue by adding "org.grails.plugins" as the groupId for the dependency and the plugin:
Dependency:
compile "org.grails.plugins:twitter-bootstrap:3.0.3"
Plugin:
runtime "org.grails.plugins:twitter-bootstrap:3.0.3"
Hope it will help
Dependencies are funny sometime. Often I have to delete my ~/.grails folder (or at least the project folder from within there)

Categories

Resources