Flutter android alarm manager plus works in emulator periodically but not working in real device? - flutter

I am using flutter android alarm manager package to get local notifications periodically. It's working perfectly in the emulator but when I am generating an apk file and installing the app in a real android device through that apk file it's not showing any notification.
So, could anyone please help me sharing your precious experience. Thanks in advance!
Here you go with my code -
Future<void> notify() async {
try {
await Quote.saveNewQuote();
} catch (e) {
print(e.toString());
}
AwesomeNotifications().createNotification(
content: NotificationContent(
id: 1,
channelKey: 'basic_notification',
title: 'Notification',
body: 'Android alarm manager periodical notification',
));
// await Quote.notifyLastQuote();
}
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await AndroidAlarmManager.initialize();
await AwesomeNotifications().initialize('resource://drawable/fitjerk_logo',
[
NotificationChannel(
channelKey: 'basic_notification',
channelName: 'FitJerk Motivation',
channelDescription: "FitJerk Today Notification ",
defaultColor: primaryDeepColor,
importance: NotificationImportance.High,
ledColor: Colors.white,
playSound: true,
enableLights: true,
enableVibration: true
)
]);
await AndroidAlarmManager.periodic(const Duration(hours: 24), 1, notify,
///TODO: here will set startAt time///
startAt: DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, 8, 30),
exact: true, wakeup: true, allowWhileIdle: true, rescheduleOnReboot: true);
And here is my AndroidMenifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.fit_jerk">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<!-- For apps with targetSDK=31 (Android 12) -->
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
<application
android:label="FitJerk"
android:name="${applicationName}"
android:icon="#mipmap/ic_launcher"
tools:ignore="ExtraText">
<!-- this portion is for android alarm plus-->
<!-- android:name = "io.flutter.app.FlutterApplication"-->
<service
android:name="dev.fluttercommunity.plus.androidalarmmanager.AlarmService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false"
tools:ignore="MissingClass" />
<receiver
android:name="dev.fluttercommunity.plus.androidalarmmanager.AlarmBroadcastReceiver"
android:exported="false"
tools:ignore="MissingClass" />
<receiver
android:name="dev.fluttercommunity.plus.androidalarmmanager.RebootBroadcastReceiver"
android:enabled="false"
android:exported="false"
tools:ignore="MissingClass">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="#string/facebook_client_token"/>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
tools:ignore="MissingClass" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true"
tools:ignore="MissingClass">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-8656344449994415~3632328521"/>
</application>
</manifest>

Related

Mi android manifest.xml no reconoce los permisos

I have an app that uses a qrscan to obtain data and then does a service with the scanned data, the first time I tested it on a Redmi 9 if it asked for later permissions with other devices it no longer asked me for permissions, asking for the correct functioning of the library
this is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app_roja_rastreo_update">
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:label="app_roja_rastreo_update"
android:icon="#mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
Try to use permission_handler in my code, to force the user to activate the permissions
but the console gave me this:
V/BoostFramework(28768): mAcquireFunc method = public int com.qualcomm.qti.Performance.perfLockAcquire(int,int[])
V/BoostFramework(28768): mReleaseFunc method = public int com.qualcomm.qti.Performance.perfLockRelease()
V/BoostFramework(28768): mAcquireTouchFunc method = public int com.qualcomm.qti.Performance.perfLockAcquireTouch(android.view.MotionEvent,android.util.DisplayMetrics,int,int[])
V/BoostFramework(28768): mIOPStart method = public int com.qualcomm.qti.Performance.perfIOPrefetchStart(int,java.lang.String)
V/BoostFramework(28768): mIOPStop method = public int com.qualcomm.qti.Performance.perfIOPrefetchStop()
V/BoostFramework(28768): BoostFramework() : mPerf = com.qualcomm.qti.Performance#4363c91
50
D/permissions_handler(28768): No permissions found in manifest for: []2
my code with the use of permission handler
#override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () async {
var status = await Permission.camera.status;
//await Permission.contacts.request();
if(status.isDenied|| status.isRestricted||status.isPermanentlyDenied){
await Permission.contacts.request();
}
if (await Permission.contacts.request().isGranted) {
processQuery(context, await getCode());
}
},
child: Container(
decoration: BoxDecoration(
color: Colors.blue.shade700,
borderRadius: BorderRadius.circular(15)),
width: 60,
height: 60,
child: Icon(
Icons.qr_code,
color: Colors.white,
),
),
);
}

share list of Images from gallery and any type of files from outside our application:

I'm trying to share a list of images from the gallery into my app to use it recycler view
or any thing else
<activity
android:icon="#mipmap/ic_launcher"
android:name=".MainActivity"
>
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.SEND"/>
<data android:mimeType="*/*"/>
</intent-filter>
</activity>
that works:-
1-specify these lines on the manifest
<activity
android:icon="#mipmap/ic_launcher"
android:name=".MainActivity"
>
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.SEND_MULTIPLE"/>
<data android:mimeType="*/*"/>
<data android:mimeType="image/jpeg" />
<data android:mimeType="image/png" />
<data android:mimeType="image/jpg" />
</intent-filter>
</activity>
2-Second get the action that opened your intent and check if its the one we registered for the activity and then the data is received as ArrayList of Uri
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = getIntent();
if (Intent.ACTION_SEND_MULTIPLE.equals(intent.getAction())) {
Bundle extras = intent.getExtras();
if (extras.containsKey(Intent.EXTRA_STREAM)) {
ArrayList<Uri> urisArrayList = extras.getParcelableArrayList(Intent.EXTRA_STREAM);
urisArrayList.forEach(i-> Log.d(TAG, "onCreate: "+i.toString()));
}
}}

Couldn't find class in spite of the fact that Dex is enabled

I am trying to migrate an app from Eclipse to the android studio I have just the files and the last person who was writing it in eclipse didn't export it for importing project. I have started a new project and manually imported the files and the lib files and tried to solve the errors till the program is now running with no Gradle errors. now I am in this situation that the dex in Gradle is enabled but when I run the program it is confused and tells me it doesn't recognize some classes.
this is my manifest file
<permission
android:name="com.company.MyProject.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<supports-screens android:smallScreens="true" />
<supports-screens android:normalScreens="true" />
<supports-screens android:largeScreens="true" />
<supports-screens android:xlargeScreens="true" />
<supports-screens android:anyDensity="true" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.company.MyProject.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.CLEAR_APP_CACHE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<permission
android:name="com.company.MyProject.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.company.MyProject.permission.C2D_MESSAGE" />
<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:name="com.company.MyProject.TruckApplication"
android:allowBackup="true"
android:icon="#drawable/MyProject_logo"
android:label="#string/app_name"
android:largeHeap="true"
android:sharedUserId="android.uid.system"
android:theme="#style/AppTheme" >
<uses-library android:name="com.google.android.maps" />
<activity
android:name="com.company.MyProject.Authenticate_user_Activity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.company.MyProject.Login_Activity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.SubmitWaiver_Activity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.PrepStopChoice"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<!--<activity-->
<!--android:name="com.company.MyProject.Surveyold_Activity"-->
<!--android:configChanges="keyboardHidden|orientation|screenSize"-->
<!--android:screenOrientation="portrait" >-->
<!--</activity>-->
<activity
android:name="com.company.MyProject.GetStops_Activity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.Load_Activity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.AddComment_Activity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" >
</activity>
<activity
android:name="com.company.MyProject.StopDetail_Activity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.CaptureImage_Activity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.Survey_Activity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.GetDirection_Activity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.Map_FragmentActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.TabBar"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.ShowStopList_Activity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.company.MyProject.PrepActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="landscape" >
</activity>
<activity
android:name="com.company.MyProject.TransprentActivity"
android:noHistory="true"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:windowSoftInputMode="stateHidden|adjustPan" >
</activity>
<receiver
android:name="com.google.android.gcm.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" />
<category android:name="com.company.MyProject" />
</intent-filter>
</receiver>
<service android:name="com.MyProject.Service.SyncService" >
</service>
<receiver android:name="com.MyProject.BrodcastReciver.NetworkStateReceiver" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<receiver android:name="com.company.MyProject.RepeatingAlarmService" />
<receiver android:name="com.company.MyProject.RepeatingAlaramCommunication" />
<receiver android:name="com.company.MyProject.ReaptingAlramNewStops" />
<service android:name="com.MyProject.Service.LogoutService" >
</service>
<service android:name="com.MyProject.Service.CallNewStop_Service" >
</service>
<service android:name="com.MyProject.Service.CheckingGooglePlayVersionService" >
</service>
<receiver
android:name="com.MyProject.BrodcastReciver.DateTimeChangeReceiver"
android:enabled="true"
android:exported="false" >
<intent_filter>
<action android:name="android.intent.action.DATE_CHANGED" />
</intent_filter>
</receiver>
<!-- Start the Service if applicable on boot -->
<receiver android:name="com.MyProject.BrodcastReciver.PhoneReStartReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service
android:name="com.company.MyProject.TruckLocationUpdateService"
android:enabled="true" />
<service
android:name="com.company.MyProject.TruckCommubicationcountService"
android:enabled="true" />
<service android:name="com.company.MyProject.GCMIntentService" />
<service android:name="com.company.MyProject.HandleNotification" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyB6Ae82d_eLZ1nMYIW7EaaQ3-2-Xn7duHs" />
<!-- android:value="AIzaSyAkZzWl6FSP89yWf7VeX6ooYvd6SuRnV4E" /> -->
</application>
<!--<uses-permission-->
<!--android:name="android.permission.ACCESS_MOCK_LOCATION"-->
<!--android:required="false" />-->
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-permission
android:name="android.permission.FLASHLIGHT"
android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
android:protectionLevel="normal"
android:required="false" />
this is my gradle File
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.company.MyProject"
minSdkVersion 14
targetSdkVersion 25
versionCode 70
versionName "7.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// compile 'com.android.support:appcompat-v4:25'
testCompile 'junit:junit:4.12'
// compile fileTree(include: '*.jar', dir: 'libs')
compile 'com.google.android.gms:play-services:10.2.1'
// compile "com.google.android.gms:play-services-gcm:10.2.1"
// compile 'org.apache.httpcomponents:httpmime:4.5.3'
// compile files('libs/gson-2.2.4.jar')
// compile files('libs/httpmime-4.2.2.jar')
// compile files('libs/joda-time-2.1.jar')
// compile files('libs/universal-image-loader-1.9.4.jar')
compile files('libs/android-support-v4.jar')
}
And this is my error log
AndroidRuntime: FATAL EXCEPTION: main
Process: com.company.MyProject, PID: 27974
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.company.MyProject/com.company.MyProject.Authenticate_user_Activity}: java.lang.ClassNotFoundException: Didn't find class "com.company.MyProject.Authenticate_user_Activity" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.company.MyProject-2/base.apk", zip file "/data/app/com.company.MyProject-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.company.MyProject-2/lib/arm64, /system/lib64, /vendor/lib64]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2567)
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: java.lang.ClassNotFoundException: Didn't find class "com.company.MyProject.Authenticate_user_Activity" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.company.MyProject-2/base.apk", zip file "/data/app/com.company.MyProject-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.company.MyProject-2/lib/arm64, /system/lib64, /vendor/lib64]]
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.app.Instrumentation.newActivity(Instrumentation.java:1078)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2557)
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) 
Suppressed: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/MyProject/Interface/Authenticate_Interface;
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
... 12 more
04-04 19:37:17.028 27974-27974/com.company.MyProject E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.MyProject.Interface.Authenticate_Interface" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.company.MyProject-2/base.apk", zip file "/data/app/com.company.MyProject-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.company.MyProject-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.company.MyProject-2/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 15 more
could you guys please help me to solve my problem.

Android Facebook Login button XML error

I want to create a test project works 'facebook login'.
I made with reference to the developers site and blog equal, But I met with an error message on xml.
[error massage]
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.facebooktest.zoit.facebooktest/com.facebooktest.zoit.facebooktest.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class com.facebook.login.widget.LoginButton
[xml]
<com.facebook.login.widget.LoginButton
android:id="#+id/facebook_login_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp"
android:layout_marginTop="30dp" />
[Manifest]
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebooktest.zoit.facebooktest">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
</manifest>
[MainActivity]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FacebookSdk.sdkInitialize(getApplicationContext());
AppEventsLogger.activateApp(this);
facebookLoginButton.registerCallback(callbackManager,
new FacebookCallback<LoginResult>() {...
...
public void onActivityResult(...
void geHashKey(){...
void geHashKey(){ ...
public void onResume(){ ...
public void onPause(){...
Do you know what's wrong? please help.
I know!
FacebookSdk.sdkInitialize(getApplicationContext());
AppEventsLogger.activateApp(this);
setContentView(R.layout.activity_main);
"setContentView(R.layout.activity_main);"
I succeeded to move the this code below to Facebook code.

Revmob Unity : Banner ads not clickable

I am developing a game which required to show Revmob Banner ads.
I can successfully show banner ads, but can't not click on it. It's media id is into testing mode.
My code for it is below.
private RevMob rev mob;
void Awake() {
revmob = RevMob.Start(REVMOB_APP_IDS, "RevMob");
}
void Start() {
revmob.CreateBanner(RevMob.Position.BOTTOM);
revmob.ShowBanner(RevMob.Position.BOTTOM);
}
Please help me.
Try adding the following line in the AndroidManifest.xml file within the activity tags for UnityPlayerNativeActivity
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
Example
<application android:icon="#drawable/app_icon" android:label="#string/app_name" android:debuggable="false" android:largeHeap="true">
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="#string/app_name" android:screenOrientation="portrait" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>