最近将我的Android Studio更新为3.0版本(从2.3开始)并添加了一些新的sdk文件并将Gradle更新为3.0.0(从2.4-all)。 但是现在当我在4.2安卓版手机中测试我的应用程序时,它崩溃了这个错误:
java.lang.ExceptionInInitializerError
at android.support.v4.app.SupportActivity.<init>(SupportActivity.java:68)
at android.support.v4.app.BaseFragmentActivityApi14.<init>(BaseFragmentActivityApi14.java:28)
at android.support.v4.app.BaseFragmentActivityJB.<init>(BaseFragmentActivityJB.java:34)
at android.support.v4.app.FragmentActivity.<init>(FragmentActivity.java:75)
at android.support.v7.app.AppCompatActivity.<init>(AppCompatActivity.java:60)
at com.bachecubano.elbache.IntroActivity.<init>(IntroActivity.java:23)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1980)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2090)
at android.app.ActivityThread.access$600(ActivityThread.java:136)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4802)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:813)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:580)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1306]: 145 cannot locate '__isnanf'...
当我开始一个新项目并且测试工作正常时,我的头断了!
这是我的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.xxx.xxx"
minSdkVersion 15
targetSdkVersion 26
versionCode 29
versionName "1.12"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError true
}
buildToolsVersion '27.0.1'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':android-rate')
implementation project(':okhttp-3.10.0')
implementation project(':okio-1.14.0')
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
implementation 'com.android.support:support-vector-drawable:26.0.0-beta1'
implementation 'com.android.support:recyclerview-v7:26.0.0-beta1'
implementation 'com.android.support:cardview-v7:26.0.0-alpha1'
implementation 'com.android.support:support-annotations:26.0.0-beta1'
implementation 'com.android.support:support-v4:26.0.0-beta1'
implementation 'com.android.support:design:26.0.0-alpha1'
}