We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi everyone, i was trying to export a signed package and got the following error:
C:\Users\MyUser\AppData\Local\Temp\android3773484529728961458sketch\app\build.gradle: Error: Project depends on com.google.android.support:wearable:2.0.5, so it must also depend (as a provided dependency) on com.google.android.wearable:wearable:2.0.5 [GradleCompatible]
Explanation for issues of type "GradleCompatible":
There are some combinations of libraries, or tools and libraries, that are
incompatible, or can lead to bugs. One such incompatibility is compiling
with a version of the Android support libraries that is not the latest
version (or in particular, a version lower than your targetSdkVersion.)
1 errors, 0 warnings
I thought that there was something wrong with my code, so i've made the following, just to try:
void setup()
{
fullScreen();
}
void draw()
{
background(#304D35);
delay(1000);
background(#304D41);
delay(1000);
}
and got the same error. The AndroidManifiest.xml it's the following one:
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="2" android:versionName="1.1" package="com.example.prueba">
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="26"/>
<application android:icon="@drawable/icon" android:label="">
<activity android:name=".MainActivity" android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
And i've added the necesary icon-36, 48, 72, 96, 144 and 192 .jpg files to export the app
Answers
An solution that i found to generate the APK is:
In processing:
·Export Android project
With android studio:
1-Import Project
2-Use Android Studio's SDK
3-Select the Android folder generated on the folder of your sketch
4-Wait for everything to build up (it takes time, if your code is long, it will take more (for the example code above it took about 5 mins, and for my real code took over 15 mins, at least with my average pc))
5-Go to Build
6-Build APK(s)
7-Again, wait for everything to build up (this process can take three times less than the other)
8-The .apk file will be on the path of your processing sketch, then ==>\android\app\build\outputs\apk\debug\
This process it's a little bit anoying, since processing "offers" a solution to export the apk, but it didn't work for me
@erwrow
Thanks for sharing your solution.
Kf