android-maven-plugin

Change output folder for Android R.java in Eclipse when using Maven

我只是一个虾纸丫 提交于 2019-12-07 04:08:32
问题 I have an android project setup using the maven-android plugin. This plugin adheres to maven output folders for the location of the R.java file (i.e. target/generated-sources/r ). However, when using this project in Eclipse, I can't configure aapt to rely on that folder. Even if I manually go into the project properties and set up the folders manually, the ADT plugin goes in and resets just some of the settings (i.e. adds the /gen folder back as a source folder, and restores the output folder

Maven Filtering

試著忘記壹切 提交于 2019-12-06 04:31:51
I am using Maven (3.x) to build an Android application within Hudson. I use filtering/profiles to do text substition of the strings.xml file as part of the build. So within the strings.xml, I will have entries such as: <string name="app_name">${app_name}</string> Within the pom.xml file, I have profile entries: <profiles> <profile> <id>local</id> <properties> <app_env>local</app_env> <app_name>Acme-loc</app_name> </properties> </profile> <profile> <id>dev</id> <properties> <app_env>dev</app_env> <app_name>Acme-dev</app_name> </properties> </profile> .... When I look inside the *.apk, the

packaging android facebook sdk as apklib with maven

孤者浪人 提交于 2019-12-05 21:49:14
问题 I have used maven-android-plugin 3.0.0-alpha-7 to package the facebook android sdk as a apklib. It looks like this: $ unzip sdk-1.0-SNAPSHOT.apklib Archive: sdk-1.0-SNAPSHOT.apklib creating: META-INF/ inflating: META-INF/MANIFEST.MF inflating: AndroidManifest.xml creating: assets/ creating: res/ creating: res/drawable/ creating: res/drawable-hdpi/ creating: res/drawable-ldpi/ inflating: res/drawable/facebook_icon.png inflating: res/drawable-hdpi/facebook_icon.png inflating: res/drawable-ldpi

You need to use a Theme.AppCompat theme (or descendant) with this activity after adding google-play-services

 ̄綄美尐妖づ 提交于 2019-12-05 10:30:34
In application I'm currently developing (it's my first android application) I use android-maven-plugin and maven-android-sdk-deployer. Application had been working great (MainActivity that uses ActionBarActivity had been shown correctly) until I added a google-play-servies library. After that I'm getting the following exception (no changes in application except adding required dependencies to pom.xml): E/AndroidRuntime( 2146): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.myapp.acts.MainActivity}: java.lang.IllegalStateException: You need to use a Theme

Error building Android project with Maven: Platform/API level 16 not available

泄露秘密 提交于 2019-12-04 01:15:45
问题 I was actually compiling a android project using maven: mvn clean install and i got this error but don't understand why this is happening Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources (default-generate-sources) on project helloflashlight: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources failed: Invalid SDK: Platform/API level 16 not available.

Android Maven plugin - How to start an app automatically after deploying it

醉酒当歌 提交于 2019-12-03 16:11:41
I wondering if there's a way to start an application which was deployed using mvn install android:deploy automatically. If this is somehow possible it would speedup development. Here the post: http://www.hrupin.com/2011/06/21/how-to-run-android-application-then-you-use-maven-in-your-project First you need to add plugin in your POM <plugin> <artifactId>exec-maven-plugin</artifactId> <groupId>org.codehaus.mojo</groupId> <configuration> <executable>${basedir}/scripts/run_app.sh</executable> </configuration> </plugin> add script in ${basedir}/scripts/ dir with next content: adb shell am start -a

Android dependencies : apklib vs aar files

送分小仙女□ 提交于 2019-12-03 14:57:22
问题 From my understanding, apklib contains code + resource shared with Maven . aar files are distributed by Gradle . The aar differ from apklib in one major way : classes are compiled and included in a classes.jar in the root of the aar. Whereas apklib cannot contain compiled class files or jars. 1 Can somebody explain the main differences between apklib vs aar files ? 2 Can Maven use aar ? Can Gradle use apklib ? 3 Which format is "better" ? 回答1: 1 Can somebody explain the main differences

Error in pom file in Maven project after importing into Eclipse

馋奶兔 提交于 2019-12-03 11:53:32
问题 I am actually new to the Maven framework. I already have a Maven project. I installed the Maven plugin etc into my EclipseIDE from http://m2eclipse.sonatype.org/sites/m2e. Then I imported my project and enabled dependencies, but the project is showing too many errors. The pom.xml itself is showing errors. The errors are Project Build Error:unknown packaging:apk Project Build Error:unresolvable build extension:plugin" etc. My error area is: project xmlns="http://maven.apache.org/POM/4.0.0"

Could not find tool aapt. Please provide proper Android SDK directory path as configuration parameter

馋奶兔 提交于 2019-12-03 06:50:12
问题 I am trying to build a android project using maven. But when I run : mvn clean install I get the following error: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.4.1:generate- sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <\sdk><\path>...</path></sdk> in the plugin . As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set

Android dependencies : apklib vs aar files

只谈情不闲聊 提交于 2019-12-03 05:39:59
From my understanding, apklib contains code + resource shared with Maven . aar files are distributed by Gradle . The aar differ from apklib in one major way : classes are compiled and included in a classes.jar in the root of the aar. Whereas apklib cannot contain compiled class files or jars. 1 Can somebody explain the main differences between apklib vs aar files ? 2 Can Maven use aar ? Can Gradle use apklib ? 3 Which format is "better" ? 1 Can somebody explain the main differences between apklib vs aar files ? Couple differences that come to my mind, in addition to the ones you mentioned aar