Android棒棒糖,棉花糖工作但kitkat无法正常工作

时间:2017-05-08 10:48:21

标签: android android-glide

最初我的应用程序在棉花糖,kitkat和棒棒糖中工作正常。当我在我的应用程序中添加图库时,它在棉花糖,棒棒糖中工作正常。但是当我在kitkat中运行时崩溃了。

错误:

05-08 16:31:52.171 12924-12924/com.niloyhalkhata.apps E/GMPM: Scheduler not set. Not logging error/warn.
05-08 16:31:52.192 12924-12947/com.niloyhalkhata.apps E/GMPM: Uploading is not possible. App measurement disabled
05-08 16:31:52.197 12924-12924/com.niloyhalkhata.apps E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.niloyhalkhata.apps, PID: 12924
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.niloyhalkhata.apps/com.niloyhalkhata.apps.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.niloyhalkhata.apps.MainActivity" on path: DexPathList[[zip file "/data/app/com.niloyhalkhata.apps-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.niloyhalkhata.apps-2, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2265)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
at android.app.ActivityThread.access$800(ActivityThread.java:152)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5330)
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:830)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:646)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.niloyhalkhata.apps.MainActivity" on path: DexPathList[[zip file "/data/app/com.niloyhalkhata.apps-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.niloyhalkhata.apps-2, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2256)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
at android.app.ActivityThread.access$800(ActivityThread.java:152)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5330)
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:830)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:646)
at dalvik.system.NativeStart.main(Native Method)
05-08 16:31:52.242 12616-12776/com.facebook.katana E/dalvikvm: Could not find class 'com.facebook.push.adm.ADMBroadcastReceiver', referenced from method X.3hy.b

摇篮:

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.1'

defaultConfig {
applicationId "com.niloyhalkhata.apps"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

dexOptions {
javaMaxHeapSize "4g"
}

}




dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(path: ':HotelImagelibrary')
compile project(path: ':passcodeview')
compile project(path: ':topsnackbar')
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:mediarouter-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services:8.4.0'
compile files('libs/httpmime-4.0.1.jar')
compile files('libs/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')


compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:palette-v7:25.0.1'
compile 'com.android.support:support-v4:25.0.1'

compile 'com.android.support:multidex:1.0.1'
}

清单:

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS"/>



<application
android:allowBackup="true"
android:icon="@drawable/halkhata_app_icon"
android:label="@string/app_name"
android:theme="@style/MyMaterialTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ListActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".HotelDetailsActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".DetailsActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".WebviewActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".Splash"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />

<receiver android:name=".NotificationPublisher" />

<activity android:name=".DrawerMainActivity" />

<activity android:name=".MapsActivity" />

<activity android:name=".NotificationDetailsActivity"
android:launchMode="singleTask"/>

<activity android:name=".GalleryActivity"
android:label="Photo Gallery"/>

<activity android:name=".GalleryDetailActivity"
android:label="View Photo"/>


<meta-data
android:name="com.google.android.geo.API_KEY"
android:value=""/>

</application>

</manifest>

0 个答案:

没有答案