gpt4 book ai didi

android - 解析 NoClassDef 错误

转载 作者:行者123 更新时间:2023-11-29 19:57:40 25 4
gpt4 key购买 nike

在 android 4.1-4.4 上我遇到了很多应用程序崩溃。它与解析的初始化有关,它只影响这些 android 版本,它在 5.0-6.0 上完美运行。 logcat错误如下

java.lang.NoClassDefFoundError: com.parse.Parse$Configuration$Builder
at com.parse.Parse.initialize(Parse.java:364)
at com.intellidev.faucetpro2.lll.onCreate(lll.java:62)
at android.app.Activity.performCreate(Activity.java:5264)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
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:828)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644)
at dalvik.system.NativeStart.main(Native Method)

构建.gradle

apply plugin: 'com.android.application'

android {

compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.intellidev.faucetpro2"
minSdkVersion 15
targetSdkVersion 15
versionCode 10
versionName "1.3.2"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
preDexLibraries = false
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/maven/commons-io/commons-io/pom.xml'
exclude 'META-INF/maven/commons-io/commons-io/pom.properties'
exclude 'META-INF/ASL2.0'
}

}
repositories {
maven {
url "https://dl.bintray.com/supersonic/android-sdk"
}
mavenCentral()
jcenter()
maven {
url "https://jitpack.io"
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile project(':appgrade')
compile 'com.github.javiersantos:MaterialStyledDialogs:1.3'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'org.sharegov:mjson:1.3'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'org.bouncycastle:bcprov-jdk16:1.46'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.android.support:support-v4:23.2.1'
compile 'com.supersonic.sdk:mediationsdk:6.3.6@jar'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.orhanobut:dialogplus:1.11@aar'
compile 'me.grantland:autofittextview:0.2.+'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'org.apache.commons:commons-io:1.3.2'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.androidadvance:topsnackbar:0.0.9'
}
apply plugin: 'com.google.gms.google-services'

list

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.intellidev.faucetpro2" >

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission
android:name="android.permission.PACKAGE_USAGE_STATS"
tools:ignore="ProtectedPermissions" />

<permission
android:name="com.parse.starter.permission.C2D_MESSAGE"
android:protectionLevel="signature" />

<uses-permission android:name="com.parse.starter.permission.C2D_MESSAGE" />

<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity
android:name=".LoginActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.playerize.superrewards.activities.SRWebViewActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.supersonicads.sdk.controller.ControllerActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true" />
<activity
android:name="com.supersonicads.sdk.controller.InterstitialActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent" />
<activity
android:name="com.supersonicads.sdk.controller.OpenUrlActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent" />


<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.parse.push.gcm_sender_id"
android:value="id:862222248463" />
<activity android:name=".MainActivity" >
</activity>

<service android:name="com.parse.PushService" />

<receiver
android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false" >
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />

<!-- IMPORTANT: Change "com.parse.starter" to match your app's package name. -->
<category android:name="com.intellidev.faucetpro" />
</intent-filter>
</receiver>

<activity
android:name="com.appgrade.sdk.view.InterstitialActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="user"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity
android:name="net.adxmi.android.AdBrowser"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Light.NoTitleBar" >
</activity>

<service
android:name="net.adxmi.android.AdService"
android:exported="false" >
</service>

<!-- Component that rewarded ADs needs -->
<service
android:name="net.adxmi.android.ExpService"
android:exported="false" >
</service>
<!-- Optional Component -->
<receiver android:name="net.adxmi.android.AdReceiver" >
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />

<data android:scheme="package" />
</intent-filter>
</receiver>
</application>

</manifest>

最佳答案

我最近遇到了这个问题,这是解析器可能发生的最糟糕的事情之一。

这仅仅是因为 SDK 过时了。我确实花了数周时间解决这个问题,我通过更新 Lollipop 以下版本的所有 SDK 解决了这个问题!

如果第一个解决方案不起作用,您可以全新安装 Android studio 并重新下载 SDK。 (我在一台新机器上试过了,它对我有用)

关于android - 解析 NoClassDef 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36584454/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com