I am unable to wrap my Android app using Wrapping tool.
When I run the following command:
Invoke-AppWrappingTool -InputPath C:\...... -OutputPath C:\output.... -KeyStorePath ......
I am getting the following error:
Application wrapping in progress. App Wrapping Tool Version:
1.0.1933.1
Failed to package app.
com.microsoft.intune.mam.apppackager.utils.AppPackagerException:
Failed to update this app's supported SDK versi
ons.
com.microsoft.intune.mam.apppackager.utils.YamlManifestUtils.updateAppSupportedSdkRange(YamlManifestUtil
s.java:324)
com.microsoft.intune.mam.apppackager.v2.V2WrapperAgent.wrapManifest(V2WrapperAgent.java:86)
com.microsoft.intune.mam.apppackager.AbstractWrapperAgent.wrap(AbstractWrapperAgent.java:68)
com.microsoft.intune.mam.apppackager.AppPackager.packageApp(AppPackager.java:132)
com.microsoft.intune.mam.apppackager.PackagerMain.mainInternal(PackagerMain.java:198)
com.microsoft.intune.mam.apppackager.PackagerMain.main(PackagerMain.java:56)
com.microsoft.intune.mam.apppackager.utils.AppPackagerException: This
app's target SDK is above the MAM target S
DK. Please upgrade to the newest version of the App Wrapping Tool.
com.microsoft.intune.mam.apppackager.utils.YamlManifestUtils.updateAppSupportedSdkRange(YamlManifestUtil
s.java:305)
com.microsoft.intune.mam.apppackager.v2.V2WrapperAgent.wrapManifest(V2WrapperAgent.java:86)
com.microsoft.intune.mam.apppackager.AbstractWrapperAgent.wrap(AbstractWrapperAgent.java:68)
com.microsoft.intune.mam.apppackager.AppPackager.packageApp(AppPackager.java:132)
com.microsoft.intune.mam.apppackager.PackagerMain.mainInternal(PackagerMain.java:198)
com.microsoft.intune.mam.apppackager.PackagerMain.main(PackagerMain.java:56)
The application could not be wrapped.
I am using targetSdkVersion 26 & compileSdkVersion 25.
It reads: Please upgrade to the newest version of the App Wrapping Tool.
... which can be found here.
Related
I am in the process of upgrading a Xamarin Android application to SDK 31, monodroid 12 and the latest androidx packages.
Every thing is now up and running except if I do not add the android:debuggable=true attribute to the android manifest I can not create debug builds.
The issue does not happen for release builds
The output error is
Target _ManifestMerger:
/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home/bin/java -cp /Library/Frameworks/Xamarin.Android.framework/Libraries/xbuild/Xamarin/Android/manifestmerger.jar com.xamarin.manifestmerger.Main obj/Debug/android/manifestmerger.rsp
/Users/Projects/app/Droid/obj/Debug/AndroidManifest.xml:14:230-255 Error:
Attribute application#debuggable value=(true) from AndroidManifest.xml:14:230-255 is also present at AndroidManifest.xml:15:9-35 value=(false).
Suggestion: add 'tools:replace="android:debuggable"' to element at AndroidManifest.xml:14:3-56:17 to override.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1489,3): error MSB6006: "java" exited with code 1.
Done building target "_ManifestMerger" in project "Droid.csproj" -- FAILED.
To get this working I currently have applied the following to the application node in the AndroidManifest.xml
tools:replace="android:debuggable" android:debuggable="true"
I would really like to figure out what this is and get it removed for obvious reasons before release.
Error:
java.lang.IllegalArgumentException: failed to configure :
Package targetSdkVersion=30 > maxSdkVersion=29
at
org.robolectric.RobolectricTestRunner.getChildren(RobolectricTestRunner.java:247)
at
org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:534)
at
org.junit.runners.ParentRunner.getDescription(ParentRunner.java:400)
at
androidx.test.ext.junit.runners.AndroidJUnit4.getDescription(AndroidJUnit4.java:149)
at
org.junit.runners.model.RunnerBuilder.configureRunner(RunnerBuilder.java:81)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:72)
at
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at
org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
at
org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:50)
at
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
Caused by: java.lang.IllegalArgumentException: Package
targetSdkVersion=30 > maxSdkVersion=29 at
org.robolectric.plugins.DefaultSdkPicker.configuredSdks(DefaultSdkPicker.java:118)
at
org.robolectric.plugins.DefaultSdkPicker.selectSdks(DefaultSdkPicker.java:69)
at
org.robolectric.RobolectricTestRunner.getChildren(RobolectricTestRunner.java:213)
... 13 more
How to fix this issue?
Found this post with the same issue, with a different error message.
This answer helped me to solve the issue.
Posting the same here.
Create a robolectric.properties file inside the app/src/test/resources directory with the following line:
sdk=29
This will force Robolectric to use API 29 instead of 30.
Note: Robolectric supports up to SDK 29 now (As on Sep 4th, 2020).
There are two ways to achieve this:
Creating prop file (mentioned in Abhimanyu's answer)
Create robolectric.properties in app/src/test/resources
Add sdk=29 in it
Limit your test target SDK using Config annotation. This makes you consider different configs for different tests or avoid creating extra config files.
#Config(sdk = [29])
class Test {
// ...
}
Both the above answers work fine, but the latest version of robolectric supports android sdk 30.
So just upgrade the robolectric dependency to fix the issue.
At the time of writing, the latest version was 4.5.1.
For the up to date version please refer the official github site.
Just update your robolectric version to 4.5 or newer, their repo notified this change:
Robolectric 4.5 adds support for Android API 30 (R final) and contains
many bug fixes and other enhancements.
Source: https://github.com/robolectric/robolectric/releases
failed to configure com.example.android.architecture.blueprints.todoapp.tasks.TasksViewModelTest.addNewTask_setsNewTaskEvent: Package targetSdkVersion=31 > maxSdkVersion=30
java.lang.IllegalArgumentException: failed to configure com.example.android.architecture.blueprints.todoapp.tasks.TasksViewModelTest.addNewTask_setsNewTaskEvent: Package targetSdkVersion=31 > maxSdkVersion=30
Had an almost similar error as above. The error was generated when I was using AndroidX Test and Robolectic APIs to execute my local unit tests. I also had included the below code to allow The testing API use the right Android manifest file during testing:
testOptions.unitTests {
includeAndroidResources = true
}
I solved the above error by downgrading my compile and target sdk from 31 to 30
I am working on the ARSimple example for ARToolKit and after setting my SDK to 4.4 and using my real device (yes I enabled USB debugging) I get this error when trying to run. What is causing this error? I can provide more info as needed.
Error:A problem occurred configuring project ':aRSimple'.
> Exception thrown while executing model rule: com.android.build.gradle.model.BaseComponentModelPlugin$Rules#createAndroidComponents(org.gradle.platform.base.ComponentSpecContainer,
org.gradle.internal.service.ServiceRegistry,
com.android.build.gradle.managed.AndroidConfig,
com.android.build.gradle.AndroidConfig,
org.gradle.model.ModelMap<com.android.build.gradle.managed.BuildType>,
org.gradle.model.ModelMap<com.android.build.gradle.managed.ProductFlavor>,
org.gradle.model.ModelMap<com.android.build.gradle.managed.SigningConfig>,
com.android.build.gradle.internal.variant.VariantFactory,
com.android.build.gradle.internal.TaskManager, org.gradle.api.Project,
com.android.builder.core.AndroidBuilder,
com.android.build.gradle.internal.SdkHandler,
com.android.build.gradle.internal.ExtraModelInfo,
java.lang.Boolean)
> failed to find target with hash string 'android-23' in: C:\Users\aaron\AppData\Local\Android\Sdk
The error message indicates that you do not have API 23 installed. You need to start the SDK Manager and download it.
Alternatively, you can set compileSdkVersion in your build.gradle file to the API version you wish to use instead.
I am trying to integrate facebook using Plugin-x in cocos2d-x v3.5. I followed the following steps:
cd to MyProject/cocos2d/plugin/tools/
./publish.sh - on cygwin all the plugins get published one by one, for eg consider this Flurry trace
atarget dir is /Users/Shivam/Documents/Gautam/FinalWorkingApp/cocos2d/plugin/publish/plugins/flurry
android project dir is /Users/Shivam/Documents/Gautam/FinalWorkingApp/cocos2d/plugin/plugins/flurry/proj.android
Publish plugin for android
~/Documents/Gautam/FinalWorkingApp/cocos2d/plugin/plugins/flurry/proj.android ~/Documents/Gautam/FinalWorkingApp/cocos2d/plugin/tools ~/Documents/Gautam/FinalWorkingApp/cocos2d/plugin/tools
BUILD SUCCESSFUL
Total time: 0 seconds
BUILD FAILED
/Users/Shivam/Documents/Gautam/android-sdk-macosx/tools/ant/build.xml:542: Unable to resolve project target 'android-7'
Total time: 0 seconds
cp: /Users/Shivam/Documents/Gautam/FinalWorkingApp/cocos2d/plugin/plugins/flurry/proj.android/bin/*.jar: No such file or directory
~/Documents/Gautam/FinalWorkingApp/cocos2d/plugin/tools
~/Documents/Gautam/FinalWorkingApp/cocos2d/plugin/tools
All the plugins get published in the similar manner. I don't have android API 7, because of which it is failing, so can this be the reason my libpluginProtocol.jar is not getting generated?
I see a proper structure under under MyProject/cocos2d/plugin/publish/plugins
I also used gameDevGuide.sh and selected facebook.
Still I don't see libPluginProtocol.jar and libPluginFacebook.jar.
Please help. TIA
Ok so I found the answer. the library gets generated only when you have all the Android APIs viz, 7,8,10,17 and 19 apart from your own target APIs
I'm using cmd prompt to build a andorid app however I keep getting this BuildFail when I call
ant release or ant debug
https://www.dropbox.com/s/99dit8ctiq3bv4w/error.png
It says:
No resource identifier found for attribute 'filterTouchesWhenObscured' in package android
followed by:
D:\Program Files\Android\android-sdk\tools\ant\build.xml: null returned: 1
Anyone know why this might be happening? I'm thinking maybe I didn't run my android update lib-project command correctly.
Any help will be greatly appreciated.
filterTouchesWhenObscured is available since API level 9. The error indicates that you are using some prior API.