Closed Jejid closed 5 years ago
I'll check this asap
Resolved. Please include the new version 1.5.5 from jcenter or jitpack whatever you want
Many Thanks but still i have the trouble, i dont know what i am doing wrong Y_Y. I used 1.5.5 and 1.5.6 with jitpack but same result.
Maybe it happen because i have "targetSdkVersion 26", "compileSdkVersion 26" and buildToolsVersion "28.0.3" ?
Here exactly error:
2019-01-08 21:11:57.747 1986-1986/domicilios.jejid.domiciliosllanos E/AndroidRuntime: FATAL EXCEPTION: main Process: domicilios.jejid.domiciliosllanos, PID: 1986 java.lang.RuntimeException: Unable to start activity ComponentInfo{domicilios.jejid.domiciliosllanos/domicilios.jejid.domiciliosllanos.MainActivity}: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class technolifestyle.com.imageslider.FlipperLayout
at domicilios.jejid.domiciliosllanos.MainFragment.onCreateView(MainFragment.java:94)
line 94 : --> vista = inflater.inflate(R.layout.fragment_main, container, false);
Can you please send me the whole logcat error output? Actually the error is due to something else I presume
Also for once try using the jcenter method too
I tried with jcenter and same result
Whole logcat error (tried to inflate layout fragment, also have error inflating an activity, but it works on v1.4.1):
--------- beginning of crash
2019-01-10 12:08:49.257 6028-6028/domicilios.jejid.domiciliosllanos E/AndroidRuntime: FATAL EXCEPTION: main
Process: domicilios.jejid.domiciliosllanos, PID: 6028
java.lang.RuntimeException: Unable to start activity ComponentInfo{domicilios.jejid.domiciliosllanos/domicilios.jejid.domiciliosllanos.MainActivity}: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class technolifestyle.com.imageslider.FlipperLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class technolifestyle.com.imageslider.FlipperLayout
Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class technolifestyle.com.imageslider.FlipperLayout
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at domicilios.jejid.domiciliosllanos.MainFragment.onCreateView(MainFragment.java:94)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2354)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3221)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3171)
at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:192)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:560)
at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:177)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1248)
at android.app.Activity.performStart(Activity.java:6696)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2628)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
2019-01-10 12:08:49.258 6028-6028/domicilios.jejid.domiciliosllanos E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class androidx.viewpager.widget.ViewPager
Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class androidx.viewpager.widget.ViewPager
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.viewpager.widget.ViewPager" on path: DexPathList[[zip file "/data/app/domicilios.jejid.domiciliosllanos-2/base.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_dependencies_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_0_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_1_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_2_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_3_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_4_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_5_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_6_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_7_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_8_apk.apk", zip file "/data/app/domicilios.jejid.domiciliosllanos-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/domicilios.jejid.domiciliosllanos-2/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:609)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at technolifestyle.com.imageslider.FlipperLayout.setLayout(FlipperLayout.java:180)
at technolifestyle.com.imageslider.FlipperLayout.
@Jejid Can you give me link to your project if it's on Github?
@Jejid Can you give me link to your project if it's on Github?
After learning to upload a project in github xD i hope i did it well. Here is: https://github.com/Jejid/localappac
AutoImageFlipper is used in fragment_main.xml, activity_busqueda.xml, MainFragment.java (method: setLayoutFlipper), BusquedaActivity (method: setLayoutFlipperOne) there i cant use flipper.setScrollTimeInSec (5); method nor remove bottom shadow cuz i use v1.4.1
Many many thanks for your help and support and excuse my bad code and development
@Jejid I checked your code, actually, the thing is that you need to update certain things in your app. Actually the problem is due to the fact that my library is for AndroidX projects, that is nothing but a better version of support libraries that you are currently using, support libraries would be deprecated after this curent version, so it's a good choice to already update your app. For that, first of all in your app's build.gradle update your targetSkVersion as well as compileSdkVersion along with buildToolsVersion to these values
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "domicilios.jejid.domiciliosllanos"
minSdkVersion 17
targetSdkVersion 28
versionCode 23
versionName "1.2.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
After syncing the changes go to Refactor (from the Android Studio's top bar) -> Migrate to AndroidX , after that it'll ask to save your existing project in the form of a zip file, do that and then refactor your code (which Android Studio will do automatically, atleast most part of it), then build and run your app in your device/emulator and voila it'll work perfectly then.
This is your final app level build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "domicilios.jejid.domiciliosllanos"
minSdkVersion 17
targetSdkVersion 28
versionCode 23
versionName "1.2.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-maps:16.0.0'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation("com.github.bumptech.glide:glide:4.8.0@aar") {
exclude group: "com.android.support"
transitive = true
}
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha01'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.github.chrisbanes:PhotoView:2.1.3'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'org.jsoup:jsoup:1.8.3'
testImplementation 'junit:junit:4.12'
implementation 'com.sun.mail:android-mail:1.5.5'
implementation 'com.sun.mail:android-activation:1.5.5'
implementation 'com.github.therealshabi:AutoImageFlipper:1.5.6'
implementation 'com.github.MikeOrtiz:TouchImageView:1.4.0'
}
This will be your gradle.properties file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
I have given this file for reference, you don't have to copy either of them, just do the steps as mentioned by me above.
OMG many thanks for wonderfully support, I already did what u said me, and now it perfectly works¡. timescrool fixed and bottom shadow able to remove.. (Y) Thanks again
I get an error: Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class technolifestyle.com.imageslider.FlipperLayout when i use v1.4.3 or 1.4.2 but if i use implementation 'com.github.therealshabi:AutoImageFlipper:v1.4.1' it work but flipper.setScrollTimeInSec(5); doesnt.
Any idea how i can update to 1.4.3? Sorry for bothering but ur proyect is vital in my first app (http://bit.ly/domiyiacacias) MANY THANKS FOR IT
next my app graddle file: app gradle.txt