I've run my app on the Android Studio emulator and it works just fine. However, when I ran it on my real phone, all the MainActivity buttons were missing. I don't know exactly what caused it, but I don't suspect it's my Java classes since they weren't even activated, and commenting them out (leaving only the layout xmls) doesn't fix it. I suspect it's something I messed up with the Gradle or manifest files. Here they are:
app gradle:
apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "com.johan.AppName" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:23.1.1' compile files('libs/exp4j-0.4.5.jar') } AppName gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.johan.AppName"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:fullBackupContent="false" android:theme="@style/AppTheme"> <activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> </manifest> When I run the app on my phone through Android Studio using a non-debug mode, I get the following warnings:
01-15 19:29:43.327 29144-29144/com.johan.AppName W/dalvikvm﹕ VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;) 01-15 19:29:43.327 29144-29144/com.johan.AppName W/dalvikvm﹕ VFY: unable to resolve interface method 14825: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z 01-15 19:29:43.327 29144-29144/com.johan.AppName W/dalvikvm﹕ VFY: unable to resolve interface method 14829: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; 01-15 19:29:43.777 29144-29144/com.johan.AppName W/dalvikvm﹕ VFY: unable to resolve virtual method 535: Landroid/content/res/TypedArray;.getChangingConfigurations ()I 01-15 19:29:43.777 29144-29144/com.johan.AppName W/dalvikvm﹕ VFY: unable to resolve virtual method 557: Landroid/content/res/TypedArray;.getType (I)I I tried googling these warnings, but the only solutions that came about were relating to working under Eclipse.
My phone is a Samsung Galaxy Grand 2 running Android 4.3, I have previously managed to successfully run the application on my phone before, I have absolutely no clue on what to do.
No comments:
Post a Comment