|
Started by Markus R., Apr., 06 2018 11:28 AM - 7 replies |
| |
| | | |
|
| |
Posted on April, 06 2018 - 11:28 AM |
Hi!
this line
addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(),R.mipmap.ic_launcher));//Use your icon to display
products this error: Error: Error returned:
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). C:\dev...\wdgen\GWDCPCOL_GlobalProcedures.java:498: error: cannot find symbol addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(),R.mipmap.ic_launcher));//Use your icon to display ^ symbol: variable mipmap location: class R 1 error :compileReleaseJavaWithJavac FAILED
Any Ideas? |
| |
| |
| | | |
|
| | |
| |
Posted on April, 06 2018 - 12:42 PM |
Hi Markus,
read this: http://fabriceharari.com/UK/Page_Article.awp…
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Free Video Courses, free WXShowroom.com, open source WXReplication, open source WXEDM.
More information on http://www.fabriceharari.com
Le 4/6/2018 à 3:28 AM, Markus R. a écrit :
Hi! this line addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(),R.mipmap.ic_launcher)); your icon to display products this error: Error: Error returned: :compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). C:\dev...\wdgen\GWDCPCOL_GlobalProcedures.java:498: error: cannot find symbol addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(),R.mipmap.ic_launcher));//Use your icon to display ^ symbol: variable mipmap location: class R 1 error :compileReleaseJavaWithJavac FAILED Any Ideas? |
| |
| |
| | | |
|
| | |
| |
Posted on April, 06 2018 - 2:11 PM |
Tanks for your answer, but is does not help. Here is the complete java function that I need:
import android.content.Context; import java.lang.Object; // https://developer.android.com/reference/packages.html
public static void addPhoneShortcut() { Intent shortcutIntent = new Intent(); shortcutIntent.setPackage("com.samsung.android.contacts"); shortcutIntent.setClassName("com.samsung.android.contacts", "com.android.dialer.DialtactsActivity" );
shortcutIntent.setAction(Intent.ACTION_MAIN); Intent addIntent = new Intent(); addIntent .putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "Phone"); addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(),R.mipmap.ic_launcher));//Use your icon to display addIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT"); getApplicationContext().sendBroadcast(addIntent); } |
| |
| |
| | | |
|
| | |
| |
Posted on April, 06 2018 - 2:35 PM |
and ?
Le 4/6/2018 à 6:11 AM, Markus R. a écrit :
Tanks for your answer, but is does not help. Here is the complete java function that I need: import android.content.Context; import java.lang.Object; https:
public static void addPhoneShortcut() { Intent shortcutIntent = new Intent(); shortcutIntent.setPackage("com.samsung.android.contacts"); shortcutIntent.setClassName("com.samsung.android.contacts", "com.android.dialer.DialtactsActivity" );
shortcutIntent.setAction(Intent.ACTION_MAIN);
Intent addIntent = new Intent(); addIntent .putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "Phone"); addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(),R.mipmap.ic_launcher)); your icon to display
addIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT"); getApplicationContext().sendBroadcast(addIntent);
} |
| |
| |
| | | |
|
| | |
| |
Posted on April, 06 2018 - 2:53 PM |
The error is the same:
Error returned:
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). C:\dev\....\wdgen\GWDCPCOL_GlobalProcedures.java:496: error: cannot find symbol addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(),R.mipmap.ic_launcher));//Use your icon to display ^ symbol: variable mipmap location: class R 1 error :compileReleaseJavaWithJavac FAILED |
| |
| |
| | | |
|
| | |
| |
Registered member 797 messages Popularité : +40 (42 votes) |
|
Posted on April, 06 2018 - 3:03 PM |
Hi. R is a class found in an Android-generated file that refers to on-screen controls; is there a midmap folder in the project source code? midmap is used by Android to refer to icons for the different screen resolutions of the devices.
Rubén |
| |
| |
| | | |
|
| | |
| |
Posted on April, 06 2018 - 3:12 PM |
HI!
I think you mean a mipmap folder, no there is no mipmap folder in my project folder (and no midmap). |
| |
| |
| | | |
|
| | |
| |
Registered member 797 messages Popularité : +40 (42 votes) |
|
Posted on April, 12 2018 - 5:48 PM |
Hi. That's why it's giving you the error. Your code refers to it. R is generated to refer to the controls that will be displayed on the screen. In this case the application icon. You must include a folder that includes these icons.
Rubén |
| |
| |
| | | |
|
| | | | |
| | |
|