I downloaded an android map app and am trying to successfully run the app. When I build and run, I however run into an error here.
--my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.shawnbe.mallfinder"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="7" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
<activity
android:label="#string/app_name"
android:name=".MallFinderActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:required="true" android:name="com.google.android.maps" />
</application>
<uses-feature android:name="android.hardware.location.gps"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
//logcat error
08-04 16:55:34.492: E/PackageManager(59): Package com.shawnbe.mallfinder requires unavailable shared library com.google.android.maps; failing!
08-04 16:55:34.492: W/PackageManager(59): Package couldn't be installed in /data/app/com.shawnbe.mallfinder.apk
[2012-08-04 12:00:34 - com.shawnbe.mallfinder.MallFinderActivity] ------------------------------
[2012-08-04 12:00:34 - com.shawnbe.mallfinder.MallFinderActivity] Android Launch!
[2012-08-04 12:00:34 - com.shawnbe.mallfinder.MallFinderActivity] adb is running normally.
[2012-08-04 12:00:34 - com.shawnbe.mallfinder.MallFinderActivity] Performing com.shawnbe.mallfinder.MallFinderActivity activity launch
[2012-08-04 12:00:34 - com.shawnbe.mallfinder.MallFinderActivity] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'MAPAPP1'
[2012-08-04 12:00:34 - com.shawnbe.mallfinder.MallFinderActivity] Uploading com.shawnbe.mallfinder.MallFinderActivity.apk onto device 'emulator-5554'
[2012-08-04 12:00:35 - com.shawnbe.mallfinder.MallFinderActivity] Installing com.shawnbe.mallfinder.MallFinderActivity.apk...
[2012-08-04 12:00:37 - com.shawnbe.mallfinder.MallFinderActivity] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2012-08-04 12:00:37 - com.shawnbe.mallfinder.MallFinderActivity] Please check logcat output for more details.
[2012-08-04 12:00:37 - com.shawnbe.mallfinder.MallFinderActivity] Launch canceled!
Your emulator AVD does not have Google Maps. Create an emulator AVD with a "Target" that has "Google APIs (Google Inc.)" in the name.
Related
I'm generating an Android application via mvn -Pandroid gluonfx:build gluonfx:package. Here are the versions from the POM:
<maven-compiler-plugin-version>3.10.1</maven-compiler-plugin-version>
<maven-surefire-plugin-version>3.0.0-M6</maven-surefire-plugin-version>
<javafx-maven-plugin-version>0.0.8</javafx-maven-plugin-version>
<gluonfx-maven-plugin-version>1.0.14</gluonfx-maven-plugin-version>
<java-version>17</java-version>
<javafx-version>18.0.1</javafx-version>
<charm-version>6.1.0</charm-version>
<attach-version>4.0.15</attach-version>
Using graalvm-svm-java17-linux-gluon-22.1.0.1-Final
The application works well on Android 8. However, when trying to install it on Android 7.0, a message pops up saying that the application is not compatible with the device. I'm not sure where the default version is specified, but following the instructions, I copied the manifest file, which was
<?xml version='1.0'?>
<manifest xmlns:android='http://schemas.android.com/apk/res/android' package='my.app.demo' android:versionCode='1' android:versionName='1.0'>
<supports-screens android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application android:label='MyApp' android:icon="#mipmap/ic_launcher">
<activity android:name='com.gluonhq.helloandroid.MainActivity' android:configChanges="orientation|keyboardHidden">
<intent-filter>
<category android:name='android.intent.category.LAUNCHER'/>
<action android:name='android.intent.action.MAIN'/>
</intent-filter>
</activity>
<activity android:name='com.gluonhq.helloandroid.PermissionRequestActivity'/>
</application>
</manifest>
and added a line for supporting sdk 24 (matches Android 7.0):
...
<supports-screens android:xlargeScreens="true"/>
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="24"/>
<uses-permission android:name="android.permission.INTERNET"/>
...
Then I put it in my project under src/android/AndroidManifest.xml and ran mvn -Pandroid gluonfx:build gluonfx:package again. The APK was generated successfully, but upon installation the same error message appeared.
How do I install the app on Android 7.0?
As mentioned in the comments, the device uses an ARMv7 processor, which uses a 32bit architecture. GraalVM supports only 64 bits, so the APKs produced by it will work only on devices with 64bits, like those with ARMv8.
I am having a problem with this.
When I run my app in the emulator, the console says that no launcher activity found when I already add one in the xml file.
Here is the console log
[2015-11-17 22:13:51 - Kamus2] ------------------------------
[2015-11-17 22:13:51 - Kamus2] Android Launch!
[2015-11-17 22:13:51 - Kamus2] adb is running normally.
[2015-11-17 22:13:51 - Kamus2] No Launcher activity found!
[2015-11-17 22:13:51 - Kamus2] The launch will only sync the application package on the device!
[2015-11-17 22:13:51 - Kamus2] Performing sync
[2015-11-17 22:13:51 - Kamus2] Automatic Target Mode: launching new emulator with compatible AVD 'MyAndroid'
[2015-11-17 22:13:51 - Kamus2] Launching a new emulator with Virtual Device 'MyAndroid'
[2015-11-17 22:14:00 - Kamus2] New emulator found: emulator-5554
[2015-11-17 22:14:00 - Kamus2] Waiting for HOME ('android.process.acore') to be launched...
[2015-11-17 22:16:08 - Kamus2] HOME is up on device 'emulator-5554'
[2015-11-17 22:16:08 - Kamus2] Uploading Kamus2.apk onto device 'emulator-5554'
[2015-11-17 22:16:08 - Kamus2] Installing Kamus2.apk...
[2015-11-17 22:17:50 - Kamus2] Success!
[2015-11-17 22:17:51 - Kamus2] \Kamus2\bin\Kamus2.apk installed on device
[2015-11-17 22:17:51 - Kamus2] Done!
and here is the androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.han"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:label="#string/app_name"
android:name=".MainActivity" >
<intent-filter >
<action android:name="android.intent.action.ACTIVITY_MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="Translate" >
<intent-filter>
<action android:name="android.intent.action.ACTIVITY_TRANSLATE" />
</intent-filter>
</activity>
<activity android:name="Insert" >
<intent-filter>
<action android:name="android.intent.action.ACTIVITY_INSERT" />
</intent-filter>
</activity>
<activity android:name="Delete" >
<intent-filter>
<action android:name="android.intent.action.ACTIVITY_DELETE" />
</intent-filter>
</activity>
<activity android:name="Help" >
<intent-filter>
<action android:name="android.intent.action.ACTIVITY_HELP" />
</intent-filter>
</activity>
</application>
</manifest>
Really appreciate the help. Thanks
Try this -
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
Your targetsdkversion missing
I'm trying to set up android multiple file chooser from https://github.com/paulasiimwe/Android-Multiple-file-Selector-Dialog.
I've added dependency to this library from my project.
Problem is app just fails when I click "run as android application".
Log:
[2015-01-30 01:55:19 - PhotoSigner] Android Launch!
[2015-01-30 01:55:19 - PhotoSigner] adb is running normally.
[2015-01-30 01:55:19 - PhotoSigner] Performing com.vladimir.photosigner.MainActivity activity launch
[2015-01-30 01:55:19 - PhotoSigner] Automatic Target Mode: using device 'HT17MV800004'
[2015-01-30 01:55:19 - PhotoSigner] Uploading PhotoSigner.apk onto device 'HT17MV800004'
[2015-01-30 01:55:26 - PhotoSigner] Failed to install PhotoSigner.apk on device 'HT17MV800004': timeout
[2015-01-30 01:55:26 - PhotoSigner] Launch canceled!
Here is my android manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com`enter code here`.vladimir.photosigner"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<activity android:name="paul.arian.fileselector.FileSelectionActivity" />
<activity android:name="paul.arian.fileselector.FolderSelectionActivity" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.vladimir.photosigner.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>
And my code calling external activity:
import paul.arian.fileselector.FileSelectionActivity;
...
setContentView(R.layout.activity_main);
Intent intent = new Intent(getBaseContext(), FileSelectionActivity.class);
startActivityForResult(intent, 0);
...
onActivityResult is exactly same as man said in https://github.com/paulasiimwe/Android-Multiple-file-Selector-Dialog.
Could anyone help with that?
I tried to run my android app in a emulator using intelliJ 13, and I configured the emulator to be a Nexus 4 running android 4.4.2 with ARM cpu, and I got the follow errors:
Waiting for device.
"C:\Program Files (x86)\Android\android-sdk\tools\emulator.exe" -avd MyAVD0 -netspeed full -netdelay none
Device connected: emulator-5554
Device is online: emulator-5554
Target device: MyAVD0 [emulator-5554]
Uploading file
local path: C:\Users\daiyue\IdeaProjects\HelloDroid\out\production\HelloDroid\HelloDroid.apk
remote path: /data/local/tmp/com.example.HelloDroid
Adb Transfer Protocol Error.
No such file or directory
The following is my manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.HelloDroid"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19"/>
<application android:label="#string/app_name" android:icon="#drawable/ic_launcher">
<activity android:name=".MyActivity"
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>
The emulator showed nothing on screen as well, only when I pressed hardware button to switch on the emulator and only 'android' logo showed up and stayed forever.
I built the app using Android SDK 4.4.2 api.
So the work around is to delete the MyAVD0 in C:\Users\username\.android\avd, and recreate MyAVD0 again using Android AVD Manager.
I am creating an android application that displays a map based on the Google maps API, which should be compatible with android 2.3 API level 10.
I have tried all the solutions i could come across such as:
imported existing code into my project (checked copy to workspace and its the directory google-play-services-lib)
added the correct meta and such in my XML (see below)
I have tried setting up the emulator with several different settings
The android application runs fine, but when this page is shown is exits.
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dcs.aber.ac.uk.cs211.group02"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="22" />
<permission
android:name="dcs.aber.ac.uk.cs211.group02.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<!-- Accessing camera hardware -->
<!-- putting android.hardware.camera prevents non-camera devices using this app -->
<uses-feature android:name="android.hardware.camera" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="dcs.aber.ac.uk.cs211.group02.permission.MAPS_RECEIVE" />
<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="dcs.aber.ac.uk.cs211.group02.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:logo="#drawable/ic_launcher"
android:theme="#style/AppTheme" >
<activity
android:name="dcs.aber.ac.uk.cs211.group02.StartScreen"
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="dcs.aber.ac.uk.cs211.group02.CreateWalkActivity"
android:label="#string/title_activity_create_walk" >
</activity>
<activity
android:name="dcs.aber.ac.uk.cs211.group02.HelpScreen"
android:label="#string/title_activity_help_screen" >
</activity>
<activity
android:name="dcs.aber.ac.uk.cs211.group02.WalkRecording"
android:label="#string/title_activity_walk_recording" >
</activity>
</application>
<meta-data android:name="dcs.aber.ac.uk.cs211.group02.API_KEY"
android:value="AIzaSyBKYpKfU4zn-3IBkskKsLbwRsQ1-IqFldk"
/>
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</manifest>
The xml displaying the map:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/black"
tools:context=".WalkRecording" >
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="#+id/mapView"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
the java code for the map class
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
public class WalkRecording extends FragmentActivity {
private GoogleMap map;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_walk_recording);
map=((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.mapView)).getMap();
map.setMapType(GoogleMap.MAP_TYPE_NORMAL);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.walk_recording, menu);
return true;
}
}
The eclipse trace:
[2013-11-22 23:03:07 - WalkingTours] ------------------------------
[2013-11-22 23:03:07 - WalkingTours] Android Launch!
[2013-11-22 23:03:07 - WalkingTours] adb is running normally.
[2013-11-22 23:03:07 - WalkingTours] Performing dcs.aber.ac.uk.cs211.group02.StartScreen activity launch
[2013-11-22 23:03:07 - WalkingTours] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'mapTestAPI16'
[2013-11-22 23:03:07 - WalkingTours] Uploading WalkingTours.apk onto device 'emulator-5554'
[2013-11-22 23:03:07 - WalkingTours] Installing WalkingTours.apk...
[2013-11-22 23:03:12 - WalkingTours] Success!
[2013-11-22 23:03:12 - google-play-services_lib] Could not find google-play-services_lib.apk!
[2013-11-22 23:03:12 - WalkingTours] Starting activity dcs.aber.ac.uk.cs211.group02.StartScreen on device emulator-5554
[2013-11-22 23:03:14 - WalkingTours] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=dcs.aber.ac.uk.cs211.group02/.StartScreen }
Seeing your error log, there is one solution provided in this link. Dont import google-play-services_lib APK, you should reference it on your project as an Android Library Project.
I had the same problem.
Look at project: Properties-> Java Build Path under projects remove google-play-services_lib.
Not necessary to include in build also as a project.